From mcp-doc
Guides creation of custom MCP tools for .mcp/manifest.yml by prompting for name, description, purpose; generates action scripts with embedded data, computes SHA-256 hashes, and updates the manifest.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mcp-doc:mcp-doc-add-toolThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guide the user through creating a custom MCP tool for their documentation manifest. Custom tools filter, query, or present documentation in ways specific to the user's project. The generated action script embeds index data and is added to `.mcp/manifest.yml` with a computed SHA-256 hash.
Guide the user through creating a custom MCP tool for their documentation manifest. Custom tools filter, query, or present documentation in ways specific to the user's project. The generated action script embeds index data and is added to .mcp/manifest.yml with a computed SHA-256 hash.
Custom tools are preserved during /mcp-doc-sync — they are never overwritten or removed by sync operations.
Read .mcp/manifest.yml from the project root.
If the file does not exist, tell the user:
No manifest found at .mcp/manifest.yml.
Run /mcp-doc-init to initialize the documentation manifest first.
Stop here if no manifest exists.
Parse the manifest and extract:
List the existing tools for context:
Existing tools in manifest:
- search_docs (default)
- get_applicable_docs (default)
- get_doc_tree (default)
- {any custom tools already created}
Ask the user a series of questions via AskUserQuestion to define the custom tool.
Ask: "What should the tool be called? Use snake_case (e.g., get_coding_standards, get_team_api_docs, list_adrs)."
Validate:
search_docs, get_applicable_docs, get_doc_treeIf the name collides, tell the user and ask for a different name.
Ask: "Describe what this tool does. Include:
Example:
description: |
Returns all coding standards and conventions for this project.
USE THIS WHEN:
- The user asks about coding standards, conventions, or style rules
- You need to check project conventions before writing code
DO NOT USE WHEN:
- The user asks about a specific file or module (use get_applicable_docs)
Ask: "What should this tool return? Choose one or describe your own:"
Present options:
standards, api, or adr)packages/auth)team parameter and return that team's docs)Based on the chosen purpose, determine:
Based on the chosen purpose:
Create the action file at .mcp/actions/{tool-name}.js (convert tool name from snake_case to kebab-case for the filename: get_coding_standards becomes get-coding-standards.js).
The action script must:
export default async function(input, ctx){ content: [{ type: "text", text: "..." }] }// Custom tool: {tool_name}
// Created by mcp-doc-add-tool — editable
const DOCS = [
{ name: "docs_coding-standards", path: "docs/coding-standards.md", title: "Coding Standards", description: "Project coding conventions and style guide" },
{ name: "docs_naming-conventions", path: "docs/naming.md", title: "Naming Conventions", description: "Variable, function, and file naming rules" },
// ... filtered subset of docs matching the chosen tags
];
export default async function(input, ctx) {
const text = DOCS.map(d =>
`- **${d.title}** (${d.path})\n ${d.description}`
).join("\n\n");
return {
content: [{
type: "text",
text: `${DOCS.length} document(s) found:\n\n${text}`
}]
};
}
// Custom tool: {tool_name}
// Created by mcp-doc-add-tool — editable
const DOCS = [
{ name: "packages_auth_readme", path: "packages/auth/README.md", title: "Auth Package", description: "Authentication and authorization module" },
{ name: "packages_auth_docs_guide", path: "packages/auth/docs/guide.md", title: "Auth Guide", description: "Setup and integration guide for auth" },
// ... docs scoped to the chosen subtree
];
export default async function(input, ctx) {
const text = DOCS.map(d =>
`- **${d.title}** (${d.path})\n ${d.description}`
).join("\n\n");
return {
content: [{
type: "text",
text: `${DOCS.length} document(s) in scope:\n\n${text}`
}]
};
}
// Custom tool: {tool_name}
// Created by mcp-doc-add-tool — editable
const DOCS = [
// ... relevant docs with team/tag/scope metadata
{ name: "packages_auth_readme", path: "packages/auth/README.md", title: "Auth Package", description: "...", team: "platform" },
{ name: "packages_billing_readme", path: "packages/billing/README.md", title: "Billing Package", description: "...", team: "payments" },
];
export default async function(input, ctx) {
const team = (input.team || "").toLowerCase();
if (!team) {
return { content: [{ type: "text", text: "Please provide a team name." }] };
}
const filtered = DOCS.filter(d => d.team === team);
if (filtered.length === 0) {
return { content: [{ type: "text", text: `No documentation found for team "${team}".` }] };
}
const text = filtered.map(d =>
`- **${d.title}** (${d.path})\n ${d.description}`
).join("\n\n");
return {
content: [{
type: "text",
text: `${filtered.length} document(s) for team "${team}":\n\n${text}`
}]
};
}
// Custom tool: {tool_name}
// Created by mcp-doc-add-tool — editable
const DOCS = [
{ name: "root_readme", path: "README.md", title: "Project Overview", description: "Start here for project overview and setup" },
{ name: "docs_architecture", path: "docs/architecture.md", title: "Architecture", description: "System architecture and design decisions" },
{ name: "docs_contributing", path: "CONTRIBUTING.md", title: "Contributing Guide", description: "How to contribute to this project" },
// ... user-selected docs in their preferred order
];
export default async function(input, ctx) {
const text = DOCS.map((d, i) =>
`${i + 1}. **${d.title}** (${d.path})\n ${d.description}`
).join("\n\n");
return {
content: [{
type: "text",
text: `Recommended reading order:\n\n${text}`
}]
};
}
Adapt the template to the user's specific requirements. The examples above are starting points — the actual embedded data and logic should match what the user described.
After writing the action file, compute its SHA-256 hash:
sha256sum .mcp/actions/{tool-name}.js | awk '{print "sha256:" $1}'
Store the computed hash for use in the manifest entry.
Add the tool entry to .mcp/manifest.yml. Insert it after the existing tool entries.
- name: {tool_name}
title: "{short human-readable title}"
description: "{user-provided description with USE THIS WHEN / DO NOT USE WHEN}"
inputSchema:
type: object
properties:
{param_name}:
type: {param_type}
description: "{param_description}"
required: [{required_params}]
action: ./actions/{tool-name}.js
actionHash: sha256:{computed-hash}
annotations:
readOnlyHint: true
If the tool has no input parameters (filter by tags, filter by scope, static list), use an empty properties object:
inputSchema:
type: object
properties: {}
Custom tools are identified by name. The three default tools are:
search_docsget_applicable_docsget_doc_treeAny tool with a different name is considered custom. The /mcp-doc-sync skill will:
If the user needs to update a custom tool's embedded data after docs change, they should either:
/mcp-doc-add-tool again to recreate itPresent what was created:
Custom tool created: {tool_name}
Action file: .mcp/actions/{tool-name}.js
Manifest: .mcp/manifest.yml (tool entry added)
Hash: sha256:{hash}
The tool is now available via the {project-name}-docs MCP server.
To test: restart the MCP server and invoke the tool.
To edit: modify .mcp/actions/{tool-name}.js directly.
The file is marked "editable" — it will not be overwritten by /mcp-doc-sync.
After editing, recompute the hash:
sha256sum .mcp/actions/{tool-name}.js | awk '{print "sha256:" $1}'
Then update the actionHash in .mcp/manifest.yml.
To delete: remove the tool entry from .mcp/manifest.yml and delete .mcp/actions/{tool-name}.js.
npx claudepluginhub z-m-huang/vcp --plugin mcp-docCreates and standardizes documentation, explanations, issues, prototypes, and tutorials using local slash command templates. Includes MCP design review workflow.
Finalizes documentation and project metadata for MCP servers. Idempotent steps update README, agent protocol, and surface area inventory. Safe to run at any stage.
Manages project documentation and standards in .maister/docs/, handles file operations, generates INDEX.md master index, and integrates with .github/copilot-instructions.md. Internal skill invoked by maister-init, standards-update, standards-discover.