Skip to main content
Glama

Add a capability to an existing project

mcpgen_add

Add a tool, prompt, or resource to an existing mcpgen-generated project using a parsed JSON capability spec, with optional dry-run and force settings.

Instructions

Add a tool, prompt, or resource to an existing mcpgen-generated project (mcpgen add). spec is the parsed JSON spec object.

Input Schema

NameRequiredDescriptionDefault
dirNoProject root; default .
kindYestool, prompt, or resource
specYesThe capability spec object (same shape as the spec file)
forceNo
dryRunNo

Output Schema

NameRequiredDescriptionDefault
okYes
fixNo
codeNo
errorNo
resultNo
exit_codeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It says nothing about what files get written or overwritten, what happens when a capability of the same name exists (the force flag hints at overwrite but is never explained), whether dryRun defaults to false, or that this mutates the project on disk.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the action and scope, with the spec clarification tacked on usefully. Efficient, though the second sentence's pronoun ('spec') is slightly clipped.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values needn't be described, and required params are named. But for a file-mutating tool with zero annotations, an undocumented force flag, and an unexplained dryRun option, the definition is thinner than the tool's complexity warrants.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only 'spec' gets meaning beyond the schema ('the parsed JSON spec object', implying the caller must parse the file rather than pass a path), and 'kind' is just restated. With 60% schema coverage, the undocumented 'force' and 'dryRun' flags — both behaviorally significant for a mutating tool — are left entirely unexplained in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource ('Add a tool, prompt, or resource') scoped to 'an existing mcpgen-generated project', which implicitly distinguishes it from mcpgen_new (new project) and mcpgen_schema/check. It never names a sibling explicitly, so the differentiation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'to an existing mcpgen-generated project' implies the prerequisite and hints that project creation belongs to mcpgen_new, but there is no explicit when-to-use/when-not guidance, no mention of what to do if the capability already exists, and no routing to mcpgen_check for validation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools