Skip to main content
Glama

generate_payload_schema

Generate TypeScript interfaces, Zod schemas, Pydantic models, or JSON Schema from captured webhook request bodies; compare multiple requests to identify optional and nullable fields.

Instructions

Generate TypeScript interfaces, Zod schemas, Pydantic models, or JSON Schema from the bodies of requests captured by a sandbox endpoint. Several requests of one event teach which fields are optional or nullable.

Input Schema

NameRequiredDescriptionDefault
nameNoRoot type name (default: from the detected event, else WebhookPayload)
pathNoOnly requests with this path
eventNoOnly requests whose detected provider event matches, e.g. "invoice.paid" or "push". One event per schema gives the tightest types.
limitNoHow many of the latest requests to read before filtering
formatNoOutput: "typescript" interfaces, "zod" schemas, "pydantic" models, or "json-schema"typescript
methodNoOnly requests with this HTTP method
requestIdsNoUse exactly these requests instead of the latest ones
endpointSlugYesThe endpoint slug

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It usefully discloses that multiple requests of one event teach optionality/nullability, but it does not state whether the operation is read-only, whether anything is stored, or how it behaves when no matching requests exist.

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 sentences, front-loaded with the core action and supported by one useful inference note. There is no wasted framing.

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?

Given the rich input schema and the absence of an output schema, the description is mostly complete: it names the output formats and explains the inference source. It could say more about the returned shape or behavior when matching requests are unavailable, but the core invocation context is covered.

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 parameter meanings are already fully documented in the input schema. The description reinforces the format choices and event-grouping idea, but adds little beyond the schema for parameters such as path, method, limit, and requestIds.

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?

The description states a specific verb and resource: generate TypeScript interfaces, Zod schemas, Pydantic models, or JSON Schema from captured request bodies. It also scopes the source as requests captured by a sandbox endpoint, making the tool clearly distinct from sibling request/endpoint management tools.

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?

It gives clear usage context: the schema is inferred from captured requests, and using several requests for one event improves optional/nullable detection. It does not explicitly name when not to use the tool or compare it to alternatives, but the siblings are not close substitutes.

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