MCP Tool Discovery, Schemas, and Errors
MCP discovery returns tool names, descriptions, and input schemas. Use those schemas to construct calls and inspect the tool result for errors.

After initialization and authentication, inspect each returned tool’s name, description, and inputSchema. Follow nextCursor if returned. For a call, check both protocol errors and the tool result’s isError field.
Before you begin
An authenticated MCP connection.
Key concepts
Tool discovery
Retrieval of the available tool names, descriptions, and input schemas. Use the current discovered schema instead of guessing an operation name.
Tool argument
A value supplied when calling a tool. It must match that tool’s exposed input schema and refer to accessible resources.
Schema
A definition of fields, types, required values, and supported constraints. Use it to validate the shape of data; it does not establish factual correctness.
Tool result
The returned data or error from a tool operation. The agent should base its report on this result rather than assuming the call succeeded.
HTTP status
The numeric outcome returned for an HTTP request. Read the response body too; accepted work can still be running.
Discover and call an MCP tool
List the tools exposed by the connected server.
Choose the operation and provide fields matching its input schema.
Inspect the returned content and error indicator before using its result in another step.
The client calls an available tool with valid arguments and handles its outcome.
Behavior and limitations
Transport success does not guarantee tool success. Required fields and names can differ from a similar REST endpoint. Refresh discovery after server changes. Do not invent tools from product labels or call tools absent from the authenticated catalog.
Related resources
Was this helpful?

