# Fix: tools/call with an unknown tool name returns -32602

> Web-audit fix skill for the `mcp-unknown-tool` check (MCP, SHOULD).

## Goal

Reject an unknown tool name with -32602 instead of a hang, a 500, or a fake result.

## Fix

Answer a `tools/call` whose `params.name` matches no registered tool with
`error.code: -32602` (Invalid params). Agents rely on the code to distinguish "no such
tool" from a transport failure; a hang, a `500`, or a `200` result for a tool that does
not exist all read as a broken server.

## Resources

- [MCP tools](https://modelcontextprotocol.io/specification/2025-06-18/server/tools)
- [JSON-RPC 2.0](https://www.jsonrpc.org/specification#error_object)

## Copy-paste prompt

Paste this into your coding agent. [Your audit](https://anc.dev/audit) adds what it observed for this check:

```text
Goal: Reject an unknown tool name with -32602 instead of a hang, a 500, or a fake result
Fix: Answer a `tools/call` whose `params.name` matches no registered tool with `error.code: -32602` (Invalid params). Agents rely on the code to distinguish "no such tool" from a transport failure; a hang, a `500`, or a `200` result for a tool that does not exist all read as a broken server.
Skill: https://anc.dev/fix/mcp-unknown-tool
Docs: https://modelcontextprotocol.io/specification/2025-06-18/server/tools, https://www.jsonrpc.org/specification#error_object
```

## Verify

Re-run the audit at [https://anc.dev/audit](https://anc.dev/audit) or call the `audit_website` MCP tool; the `mcp-unknown-tool` check should report `pass`.
