Skip to main content
Glama

generate_go_test

Generate a Go test: table-driven subtests with testify from {input, expected|throws} cases, t.Skip for described cases

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": {
      "functionName": "<functionName>",
      "packageName": "<packageName>"
    },
    "name": "generate_go_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
testCasesNoTest cases. Either a description string (generated as a pending test) or {name, input: [args...], expected} / {name, input, throws: true | "message"} for a real assertion.
packageNameYes
tableDrivenNo
functionNameYes
returnsErrorNoFunction returns (value, error) — default true

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / returnsError
      Added value: +{
      +  "description": "Function returns (value, error) — default true",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / testCases / description
      Added value: +"Test cases. Either a description string (generated as a pending test) or {name, input: [args...], expected} / {name, input, throws: true | \"message\"} for a real assertion."
    • addedInput schema / properties / testCases / items / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "properties": {
      +      "expected": {
      +        "description": "Expected return value (deep equality)"
      +      },
      +      "input": {
      +        "description": "Arguments (array) or a single argument"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "throws": {
      +        "description": "true, or a substring of the expected error message"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / testCases / items / type
      Removed value: -"string"
  2. First observed

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does disclose meaningful behavior: subtests are table-driven, assertions assume testify, and string-only cases become skipped pending tests rather than failures. It says nothing about whether generated code is written to disk or merely returned, whether existing files are overwritten, or what dependencies testify imposes — significant gaps for a mutation-flavored generator.

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?

A single front-loaded sentence leading with the verb and then specifying format, framework, and case handling; no filler or repetition. It is dense to the point of being cryptic in places, but nothing is wasted.

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?

A 5-parameter generator with no annotations, no output schema, and 40% schema coverage needs more than this: file-write semantics, the role of tableDriven versus the fixed table-driven claim, and how returnsError interacts with the throws case variant are all unaddressed. The description conveys the output shape but not enough for an agent to call it confidently.

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 only 40%, so the description needs to compensate, and it largely does not: tableDriven, packageName, and functionName are never explained, and the boolean tableDriven is in direct tension with the flat claim that output is always table-driven. The only added meaning is the input/expected/throws case contract and the t.Skip behavior for string cases, both of which the schema already documents.

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?

"Generate a Go test" states a specific verb and resource, and the rest pins down the exact output shape: table-driven subtests using testify, {input, expected|throws} cases, and t.Skip for description-only cases. It is clearly distinguishable from language-specific siblings such as generate_pytest_test or generate_jest_test, though it never names or contrasts any sibling explicitly.

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?

Usage is only implied: the tool obviously applies when the target is Go and testify-style unit tests are wanted, but there is no explicit when-to-use, when-not-to-use, or prerequisite statement (e.g. whether a source file must exist first). An agent must infer the context from the tool name and the framework mention.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.