Skip to main content
Glama
zhaolibins001-svg

Smart Browser MCP

api_assert

Send HTTP requests and validate responses by asserting status codes, expected fields, or body substrings, with a clear pass/fail report for failed checks.

Instructions

Send a request and assert on it: expectStatus (exact status code), expectFields (dot-path -> expected value, e.g. {"data.total": 10}), expectBodyContains (substring match on raw response text). Returns a clear pass/fail report; failures are also recorded and retrievable via api_errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
bodyNo
nameNoLabel for this check, shown in the report
queryNo
methodYes
headersNo
timeoutNo
expectFieldsNo
expectStatusNo
expectBodyContainsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burdenchers. It clearly discloses that the tool sends a request, what each assertion type checks, and that failures are recorded and retrievable via api_errors. It does not cover server-side side effects, auth, or rate limits, but 'Send a request' already signals the side-effecting nature.

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?

The description is two dense sentences with the primary operation front-loaded before the assertion details. The inline expectFields example is high-value and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter tool with no output schema and no annotations, the description is underspecified about the exact report format, how multiple assertions combine, and how to consume api_errors after a failure. It covers the core assertion semantics but leaves several agent-relevant execution details implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 10%, and the description compensates by adding crucial semantics for the three expect_* parameters: exact status code, dot-path equality, and substring matching on raw response text. Request-building parameters like url, body, query, headers, and timeout are not described, but their names and schema types make them reasonably self-explanatory.

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 opening phrase 'Send a request and assert on it' names a clear verb and object, and the description then lists concrete assertion behaviors: exact status code, dot-path field value matching, and substring matching on raw response text. This distinguishes it from siblings like api_request by making the assertion semantics unmistakable.

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?

The description implies the tool is for request-plus-assertion scenarios, but it never explicitly says when to use it instead of api_request or api_test_suite. There is no when-to-use, when-not-to-use, or alternative-routing guidance, so the agent must infer the intended selection criteria.

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