Skip to main content
Glama

assert_response

Sends a request and validates its response against defined assertions—status code, headers, JSON body values, and duration—returning pass/fail for each check.

Instructions

Send a request and validate the response against a set of assertions (status code, headers, JSON body values, duration). Returns pass/fail per assertion.

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>",
      "assertions": "<assertions>"
    },
    "name": "assert_response"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmedNoSet to true to confirm sending to an external URL after reviewing it
assertionsYes
request_idYes
environment_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6-beta

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the key behavioral trait that this sends a live request and returns per-assertion pass/fail. However, it omits the external-URL confirmation step implied by the 'confirmed' parameter, and says nothing about whether the request is stored, whether it mutates server state, or about auth requirements. Useful but incomplete for an un-annotated network-calling 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-loaded with the action and then the return semantics. Every clause carries information and there is no filler.

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?

For a four-parameter tool that performs a live network call with no annotations and no output schema, the description leaves too much out: what request_id refers to, what environment_id selects, and how the confirmation gate works before hitting an external URL. The pass/fail return line is helpful but does not offset these gaps.

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 25%, so the description must compensate, and it only partially does by naming the assertion categories that map to the 'type' enum. It never mentions request_id, environment_id, the top-level assertions array shape, or the confirmation/`confirmed` flow for external URLs, leaving required parameters unexplained in both places.

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 description gives a specific verb chain ('Send a request and validate the response') plus the resource and the assertion categories covered (status code, headers, JSON body values, duration). It is clearly distinct from read-oriented siblings like get_response_history or inspect_response. It stops short of naming an alternative sibling, so it does not fully satisfy the sibling-differentiation bar for 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 Guidelines2/5

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

There is no when-to-use guidance: nothing says when to pick assert_response over contract_test or ai_suggest_tests, nor when re-validation is unnecessary. The only implied guidance is that it sends a live request, which an agent could infer but is not stated as a usage condition.

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