home/writing/add-mcp-tool-prompt

Add Mcp Tool.prompt

GPTClaudeGemini··230 copies·updated 2026-07-14
add-mcp-tool-prompt.prompt
---
agent: "mcp-tool-author"
name: add-mcp-tool
description: "Add a new MCP tool in src/mcp_tools with zod schema, deterministic outputs, and proper registration."
---

Goal: Add a new MCP tool to the server.

Inputs:
- Tool name (string): ${input:tool_name:Example: "search-prompts"}
- Title: ${input:title:Human-readable title}
- Description: ${input:description:One-line description}
- Inputs (fields): ${input:inputs:List input fields + types + descriptions}
- Output format: ${input:output:Describe the output shape (text/json string)}

Procedure:
1) Create `src/mcp_tools/<tool_name>.js` that registers the tool with:
   - stable `registerTool` name
   - zod input schema
   - consistent error handling
2) Export it from `src/mcp_tools/index.js`
3) Register it in `src/mcp_server.js`
4) Add a short manual test snippet showing how to call it.

Output:
- Brief change summary
- Full contents of all changed/new files in fenced `md` code blocks
- Manual verification steps

fill the variables

This prompt has 5 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.

{input:tool_name:Example: "search-prompts"}{input:title:Human-readable title}{input:description:One-line description}{input:inputs:List input fields + types + descriptions}{input:output:Describe the output shape (text/json string)}
Unlock with Pro →

when to use it

Community prompt sourced from the open-source GitHub repo Robotti-io/copilot-security-instructions (Apache-2.0). A "Add Mcp Tool.prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

writingcommunitygeneral

source

Robotti-io/copilot-security-instructions · Apache-2.0