Skip to main content
Glama

ai_generate_body

Generates valid, realistic request bodies from JSON templates or example responses, using AI to fill in appropriate test data for API testing.

Instructions

Given a request with a JSON body template or example response, use AI to generate a valid, realistic request body with appropriate test data.

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": {
      "request_id": "<request_id>"
    },
    "name": "ai_generate_body"
  }
}

Input Schema

NameRequiredDescriptionDefault
contextNoExtra context, e.g. 'create a user named John in the UK'
request_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6-beta

TDQS

B3.1/5.0
Behavior2/5

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

No annotations exist, so the description carries the full burden, and it omits most behavioral facts an agent needs. It does not say whether the generated body is written back into the request or merely returned, whether the AI call can fail or be slow/costly, or whether it needs credentials. Only the LLM-driven, non-deterministic nature is conveyed indirectly by 'use AI'.

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 with no filler, but the phrasing 'given a request with a JSON body template or example response' is slightly tangled and could be tightened. Nothing extraneous, though also nothing prioritized.

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?

With no annotations and no output schema, the description must explain the result of the call, and it does not: an agent cannot tell whether the response is the generated JSON body or a status confirmation, nor whether the request is mutated. For a tool that invokes an LLM and produces a payload, that is a major unaddressed gap.

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?

Two parameters with 50% schema coverage; the schema documents 'context' with a concrete example ('create a user named John in the UK') but leaves 'request_id' undescribed. The description adds only the notion that the body is derived from an existing request's template or example, which vaguely ties to request_id but adds no format or constraint detail beyond the schema.

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?

States a specific verb and resource: use AI to generate a valid, realistic request body with test data. It also names the trigger condition (a request with a JSON body template or example response). It does not distinguish itself from plausibly overlapping siblings such as ai_fix_request or generate_crud_requests, so it stops short of a 5.

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 via the precondition 'given a request with a JSON body template or example response'; the agent must infer that this applies to creating test payloads. There is no explicit when-not guidance, no mention of alternatives, and no statement about what to do if the request has no body template.

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