Skip to main content
Glama

Generate a new MCP server project

mcpgen_new

Generate a new Go MCP server project from tool, prompt, and resource specs; optionally dry-run the plan or skip validation.

Instructions

Generate a new Go MCP server project (mcpgen new). Writes files unless dryRun. Runs the validation pipeline unless noCheck.

Input Schema

NameRequiredDescriptionDefault
dirNoOutput directory, e.g. ./weather
nameNoServer name
portNoHTTP port when transport=http
forceNoAllow generating into an existing non-empty directory
toolsNoTool spec objects
dryRunNoPlan only; write nothing
moduleNoGo module path, e.g. github.com/acme/weather
noCheckNoSkip the validation pipeline
promptsNoPrompt spec objects
versionNoServer version (semver)
featuresNoOpt-in features: tasks, skills, oauth
protocolNocompat or latest-only
resourcesNoResource spec objects
transportNostdio or http

Output Schema

NameRequiredDescriptionDefault
okYes
dirNo
fixNo
codeNo
planNo
checkNo
errorNo
exit_codeNo
next_actionsNo
files_skippedNo
files_writtenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changedv0.1.1
    • addedInput schema / properties / prompts / items / additionalProperties
      Added value: +false
    • removedInput schema / properties / prompts / items / items
      Removed value: -{
      -  "maximum": 255,
      -  "minimum": 0,
      -  "type": "integer"
      -}
    • addedInput schema / properties / prompts / items / properties
      Added value: +{
      +  "arguments": {
      +    "description": "Prompt arguments",
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "description": {
      +          "description": "Argument description",
      +          "type": "string"
      +        },
      +        "name": {
      +          "description": "Argument name",
      +          "type": "string"
      +        },
      +        "required": {
      +          "description": "Whether the argument is required",
      +          "type": "boolean"
      +        },
      +        "title": {
      +          "description": "Argument title",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name"
      +      ],
      +      "type": "object"
      +    },
      +    "type": [
      +      "null",
      +      "array"
      +    ]
      +  },
      +  "description": {
      +    "description": "Prompt description",
      +    "type": "string"
      +  },
      +  "id": {
      +    "description": "Prompt id (unique, [a-zA-Z0-9_-]+)",
      +    "type": "string"
      +  },
      +  "title": {
      +    "description": "Prompt title",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / prompts / items / required
      Added value: +[
      +  "id"
      +]
    • changedInput schema / properties / prompts / items / type
      Previous value: -[
      -  "null",
      -  "array"
      -]New value: +"object"
    • addedInput schema / properties / resources / items / additionalProperties
      Added value: +false
    • removedInput schema / properties / resources / items / items
      Removed value: -{
      -  "maximum": 255,
      -  "minimum": 0,
      -  "type": "integer"
      -}
    • addedInput schema / properties / resources / items / properties
      Added value: +{
      +  "description": {
      +    "description": "Resource description",
      +    "type": "string"
      +  },
      +  "id": {
      +    "description": "Resource id (unique, [a-zA-Z0-9_-]+)",
      +    "type": "string"
      +  },
      +  "mimeType": {
      +    "description": "Resource MIME type",
      +    "type": "string"
      +  },
      +  "text": {
      +    "description": "Stub content served by the generated handler",
      +    "type": "string"
      +  },
      +  "title": {
      +    "description": "Resource title",
      +    "type": "string"
      +  },
      +  "uri": {
      +    "description": "Absolute URI. Exactly one of uri/uriTemplate",
      +    "type": "string"
      +  },
      +  "uriTemplate": {
      +    "description": "RFC 6570 URI template. Exactly one of uri/uriTemplate",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / resources / items / required
      Added value: +[
      +  "id"
      +]
    • changedInput schema / properties / resources / items / type
      Previous value: -[
      -  "null",
      -  "array"
      -]New value: +"object"
    • addedInput schema / properties / tools / items / additionalProperties
      Added value: +false
    • removedInput schema / properties / tools / items / items
      Removed value: -{
      -  "maximum": 255,
      -  "minimum": 0,
      -  "type": "integer"
      -}
    • addedInput schema / properties / tools / items / properties
      Added value: +{
      +  "description": {
      +    "description": "Tool description",
      +    "type": "string"
      +  },
      +  "id": {
      +    "description": "Tool id (unique, [a-zA-Z0-9_-]+)",
      +    "type": "string"
      +  },
      +  "idempotent": {
      +    "description": "Maps to the tool idempotentHint annotation",
      +    "type": "boolean"
      +  },
      +  "inputSchema": {
      +    "additionalProperties": true,
      +    "description": "JSON Schema object for tool input",
      +    "type": "object"
      +  },
      +  "outputSchema": {
      +    "additionalProperties": true,
      +    "description": "JSON Schema object for tool output",
      +    "type": "object"
      +  },
      +  "readOnly": {
      +    "description": "Maps to the tool readOnlyHint annotation",
      +    "type": "boolean"
      +  },
      +  "title": {
      +    "description": "Tool title",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / tools / items / required
      Added value: +[
      +  "id"
      +]
    • changedInput schema / properties / tools / items / type
      Previous value: -[
      -  "null",
      -  "array"
      -]New value: +"object"
  2. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that the tool writes files unless dryRun and runs a validation pipeline unless noCheck, but it omits that generation into an existing non-empty directory fails without force, does not say whether existing files can be overwritten, and gives no sense of reversibility or failure behavior.

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

Conciseness5/5

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

Two short sentences, front-loaded with the core action, and no wasted wording. The dryRun and noCheck behavior is stated compactly.

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

Completeness2/5

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

This is a complex 14-parameter generator that writes files and runs validation, yet the description explains only two boolean side effects. The output schema covers return values, but the description does not prepare an agent for directory conflicts, force semantics, transport/module choices, or the relationship between tools, prompts, and resources.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds a little meaning for dryRun and noCheck by explaining their effect, but says nothing about the other 12 parameters, including force, dir, transport, or feature selection.

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?

The description states a specific verb and resource: generate a new Go MCP server project, with the CLI equivalent `mcpgen new`. It distinguishes itself reasonably from `mcpgen_add`, `mcpgen_check`, and `mcpgen_schema` by the word 'new', though it never explicitly contrasts them.

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

Usage Guidelines2/5

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

The only usage guidance is behavioral: writes files unless dryRun and runs validation unless noCheck. There is no guidance on when to use this tool instead of `mcpgen_add` or `mcpgen_check`, no prerequisite for existing directories, and no mention that `force` is needed for non-empty output.

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