Claude Certified Architect – Foundations Practice Question 82: SDK MCP Custom Tools
Claude Certified Architect, Foundations · Test 9 · question 2 of 10
A Node.js service already contains a well-tested lookupInventory function that queries the company's database. An engineer wants a Claude Agent SDK agent to call it as a tool. The function must stay inside the existing service process, with no separate server to deploy or monitor. How should the engineer expose it?
Show answer and explanation
Answer:
A is correct. The Agent SDK lets you define a custom tool with a name, description, input schema (Zod in TypeScript) and handler, wrap it in an in-process MCP server with createSdkMcpServer, and pass it to query() through mcpServers. The server runs inside your application, not as a separate process, and Claude sees the tool as mcp__<server>__<tool>.
B is wrong because a stdio MCP server is a separate process, which is the operational overhead the team wants to avoid, even though it would work. C is wrong because parsing free text for a call pattern is brittle, bypasses the tool-use protocol, and loses schema validation and the permission flow. D is wrong because the tools option controls which built-in tools are available; it cannot register new functions.
Reference: Give Claude custom tools - Claude Agent SDK