Skip to main content
Glama

generate_test_skeleton

Emit a unittest.TestCase skeleton for a given symbol to close coverage gaps. Use it after finding untested code to get a starter test file.

Instructions

Emit a unittest.TestCase skeleton for a given symbol. Pairs with find_coverage_gaps to close the 'what's untested → write a stub' loop: find the gap, then call this tool with the symbol name to get a starter file.

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": {
      "repo_path": "<repo_path>",
      "symbol": "<symbol>"
    },
    "name": "generate_test_skeleton"
  }
}

Input Schema

NameRequiredDescriptionDefault
symbolYes
repo_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are present, so the description must carry the behavioral burden. It discloses that the output is a unittest.TestCase skeleton / starter file, but it does not clarify whether it writes a file to disk, overwrites an existing test file, or only returns generated code; those are material traits for a generator tool.

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 compact sentences front-load the action and then the workflow context; every sentence contributes. There is no repetition or boilerplate.

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?

The output schema can cover return shape, and the description supplies purpose and sibling workflow for a simple two-parameter tool. However, with no annotations and no schema descriptions, it omits operational details about repo_path and file-writing behavior, so it is only partially complete.

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?

Schema description coverage is 0% for two required parameters. The description adds only that 'symbol' is a symbol name; it says nothing about what 'repo_path' should point to or whether symbol is fully qualified, leaving the schema documentation to be inferred from parameter names alone.

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 artifact ('Emit a unittest.TestCase skeleton') for a named symbol, and explicitly links to find_coverage_gaps, so it is distinguishable from the sibling analysis tools. An agent knows this produces a starter test rather than performing coverage analysis.

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

Usage Guidelines4/5

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

Gives a clear workflow: first find a coverage gap with find_coverage_gaps, then call this tool with the symbol name. It does not state when not to use it or what to do when tests already exist, so it falls short of full when/when-not/alternatives guidance.

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