Skip to main content
Glama

cs_scaffold

Generates source files and directory structures by category—infrastructure, routing, or locations—to scaffold Contentstack Marketplace app code after manifest creation.

Instructions

Steps 6a-6c of the create workflow. Generates source files by category with directory structure. Call 3 times (infrastructure → routing → locations) after cs_manifest. Read cs://patterns before calling. Input: { spec: object, category: 'infrastructure'|'routing'|'locations' } Output: { category, directories: string[], files: [{ path, content }] } Agent MUST create all directories first, then write files.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "spec": "<spec>",
      "category": "<category>"
    },
    "name": "cs_scaffold"
  }
}

Input Schema

NameRequiredDescriptionDefault
specYesStructured app specification (same object passed to cs_plan and cs_manifest).
categoryYesFile category to generate. Call 3 times: infrastructure → routing → locations

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the required triple invocation, the ordering dependency, a documentation prerequisite, and the critical operational constraint that the agent must create directories before writing files. It stops short of stating overwrite behavior, idempotency, or what happens if called out of sequence.

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?

Dense and front-loaded, with the workflow position first and the invocation rule second. The explicit Input/Output lines partially duplicate the input schema, but the Output declaration earns its place since no output schema exists.

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

Completeness4/5

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

For a mutation-heavy generator with no annotations and no output schema, the description supplies the sequencing, prerequisite reading, and the inline return shape. Minor gaps remain around failure modes and whether regenerating a category overwrites existing files.

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 coverage is 100% and the schema already documents both parameters, including the enum ordering text ('Call 3 times: infrastructure → routing → locations'). The description's Input line largely restates the schema, so baseline 3 applies.

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

Purpose5/5

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

States a specific verb and resource ('Generates source files by category') plus scope ('with directory structure') and positions itself as steps 6a-6c after cs_manifest. An agent can distinguish this from cs_plan/cs_manifest without opening a schema.

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

Usage Guidelines5/5

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

Explicit sequencing guidance: call 3 times in the order infrastructure → routing → locations, after cs_manifest, and read cs://patterns beforehand. This is a rare case of a description naming prerequisites and ordering rather than leaving them to inference.

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