Skip to main content
Glama

Webhook payload validation module with pytest tests

submit_webhook_payload_validation
Idempotent

Produce a standard-library Python module that validates a webhook payload envelope, plus pytest tests. Choose this when an incoming webhook envelope must be validated to the registered shape and rejected with structured errors. Do not choose this for provider-specific signature verification or for a schema that differs from the registered envelope. Example requests: Write a Python module that validates a webhook JSON envelope and returns structured errors, with tests. | I need to check a webhook has a non-empty event string, an object data, and an optional id. | Generate a webhook-validation module and its pytest suite.

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": {
      "inputs": "<inputs>",
      "authorized_by": "<authorized_by>"
    },
    "name": "submit_webhook_payload_validation"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputsYes
quote_idNoThe quote_id returned by POST /v1/jobs. Required to authorize a priced capability; the service rejects a priced job that does not name the quote it issued.
authorized_byYesIdentifier of the human or agent authorizing this job.
accepted_priceNoThe amount accepted, exactly as quoted (for example "5.00" or 5). Checked against the stored quote, so a price that moved between quote and authorize is refused rather than silently absorbed. Optional, but sent to make the acceptance explicit.

Output Schema

NameRequiredDescriptionDefault
quoteNo
stateYes
job_idYes
artifactsNo
access_tokenNoPer-job credential. Present it as the X-Job-Token header to read the job or list it. Keep it; it is the only credential for this job.
verificationNoIndependent verification. verification.ok = false means the job failed, not a partial success.
capability_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare the operation is non-read-only, idempotent and non-destructive, so the safety profile is covered. The description usefully adds that output is standard-library only, that tests are included, and that behaviour is fixed by the template and verified by the template's own tests. It omits a significant behavioural trait, though: that this is a priced job requiring a quote_id/authorized_by flow, which an agent only learns from the schema.

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?

Purpose, positive trigger and exclusions are front-loaded in the first three sentences, which is the right ordering for an agent scanning for a match. The three example requests are mildly redundant with the opening sentence (the first one restates it almost verbatim), which keeps it from a 5.

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?

With an output schema present, return values need not be explained, and the description covers purpose, selection criteria and concrete examples for a nested 4-parameter job submission. The main gap is the authorization/pricing path, which an agent must discover from the quote_id and accepted_price schema fields.

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 75%, so module_name, function_name, quote_id and accepted_price are already documented in the schema. The description adds only indirect meaning via the example requests, which spell out the envelope being validated (non-empty event string, object data, optional id) rather than explaining any parameter. Baseline 3 is appropriate.

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?

The first sentence names a specific verb and deliverable: produce a standard-library Python module validating a webhook payload envelope, plus pytest tests. That is concrete enough to separate it from most siblings, but the near-identical neighbours submit_data_validation_module and submit_python_utility_module are never named, so the boundary between them must be inferred.

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?

"Choose this when an incoming webhook envelope must be validated to the registered shape and rejected with structured errors" gives an explicit positive trigger, and the following sentence gives two explicit exclusions (provider-specific signature verification, schemas differing from the registered envelope). It stops short of a 5 because no alternative sibling tool is named for the excluded cases.

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.

Resources