# How should an MCP server list and call tools and return errors?

Exam: CCDV-F — Claude Certified Developer - Foundations
Knowledge domain: Tools and MCPs
Updated: 2026-11-25T08:30:02.744967+00:00
HTML: https://learningpathx.com/faq/CCDV-F/ccdvf-mcp-tool-discovery-and-results.html

## Also asked as

- How do tools/list and tools/call work in MCP 2026-07-28?
- When should an MCP tool return isError versus a JSON-RPC error?

In MCP 2026-07-28, expose eligible tools through `tools/list` and invoke an authorized tool through `tools/call`. For a malformed JSON-RPC tool request or unknown tool, return the appropriate protocol error. For a recognized tool that cannot perform the action, return a tool result with `isError: true` and actionable, safe feedback.

Give each tool a clear name, description, input JSON Schema, and, when useful, an output schema. Return an authorized and deterministically ordered listing for an unchanged eligible set. A 2026-07-28 listing carries `ttlMs` and `cacheScope`; use `private` for caller-specific data. With the advertised list-change capability and a matching active subscription, send a notification when the available list changes. Recheck authorization and validate arguments at invocation, even if the tool appeared in the list. Treat annotations as hints from the server, with trust determined separately.

MCP results can include `content` and an optional `structuredContent` value. When you define an output schema, validate structured results against it. Check `resultType` to distinguish a complete result from a request for more input. For example, a recognized reservation tool might return an in-tool validation error for a past date. A request to a nonexistent tool belongs at the protocol layer. Record an owner, protocol revision, versioned schemas, and data and logging policy for the server. Bound request size, concurrency, execution time, and result size. Test denied access, invalid inputs, cancellation, and dependency failure, and verify that caches and handles are tenant-scoped.

* [MCP tool discovery, results, and errors](https://modelcontextprotocol.io/specification/2026-07-28/server/tools)
* [MCP subscriptions](https://modelcontextprotocol.io/specification/2026-07-28/basic/patterns/subscriptions)
* [MCP server discovery](https://modelcontextprotocol.io/specification/2026-07-28/server/discover)

Source: [MCP Server Development and Choosing Between Tools, Skills, and MCP](https://learningpathx.com/news/mcp-server-development-and-choosing-between-tools-skills-and-mcp.html)
