Tools
A tool is a function the server exposes for an agent to call. The agent picks the tool and supplies arguments; the server runs it and returns the result.
EDITED MCP's tools span three data domains — Competitive Market Data, Trend &
Research, and Messaging & Promotions — plus a set of mdmcp helpers. Some
resolve fuzzy concepts into stable identifiers (slug, id); others return
product data, analytics, article passages, or promotions directly. See
The data for the full map, or the Reference for every
tool's schema.
Discover tools
const { tools } = await client.listTools();
// → [{ name: "mdmcp-search_retailers", description: "...", inputSchema: {...} }, ...]
Each tool exposes:
name— the stable identifier, used intools/calldescription— prose the agent reads to decide when to callinputSchema— JSON Schema for the arguments
Call a tool
const result = await client.callTool({
name: "mdmcp-search_brands",
arguments: { query: "Nike", search_limit: 5 },
});
// result.content is an array of TextContent / ImageContent / etc.
The auto-generated Reference lists every tool with its full schema and a live "Try it" widget.
Batch queries
The market-data search tools accept either a single string or a list of up to ten strings. Pass a list and the server runs the searches concurrently, returning results in the same order:
await client.callTool({
name: "mdmcp-search_retailers",
arguments: { query: ["Zara", "H&M", "Uniqlo"], search_limit: 3 },
});
// → list[list[Retailer]] — one inner list per query, in order
When you need to resolve several entities at once, batch — it's faster than serial calls and lighter on context.
Result shapes
Tools return a content array of TextContent blocks. The text is JSON;
parse it on the client:
const text = result.content[0].text;
const retailers = JSON.parse(text); // matches the Retailer model
Errors
Server-side failures surface as JSON-RPC errors:
{
"jsonrpc": "2.0",
"id": 1,
"error": { "code": -32602, "message": "Invalid arguments" }
}
See Operations → Errors for every code, the HTTP-level statuses, and retry guidance.