Skip to main content
Glama

Send API Request

unfour.api.send_request

Send saved or ad-hoc API requests to reproduce failures during troubleshooting. Non-2xx responses return structured status and body data with sensitive fields masked.

Instructions

Sends either a saved API request by requestId or one ad-hoc request described by method/url/headers/query/body through the Unfour command bus. Use it to reproduce API failures during agent troubleshooting. Dev allows all HTTP methods; test allows sends but marks mutating methods as write risk; prod only allows GET/HEAD/OPTIONS. Non-2xx HTTP responses return structured status/body data rather than MCP tool failure. Sensitive headers, cookies, URL tokens, and JSON body fields are masked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL for ad-hoc sends.
bodyNoOptional request body for ad-hoc sends.
nameNoOptional display name for ad-hoc request history.
queryNoOptional query parameters as an object or array of {key,value,enabled}.
methodNoHTTP method for ad-hoc sends, such as GET, POST, PUT, PATCH, DELETE.
headersNoOptional headers as an object or array of {key,value,enabled}. Sensitive values are redacted in results.
bodyKindNoOptional body kind for ad-hoc sends (json, text, form, xml). Defaults to json.
requestIdNoOptional saved API request ID to replay. Omit when sending method/url directly.
timeoutMsNoOptional timeout in milliseconds. Omitted or null defaults to 60000ms; 0 means unlimited; positive values are used exactly.
workspaceIdNoOptional workspace ID for ad-hoc requests. Uses the active workspace if omitted.
environmentIdNoOptional per-call environment override. It is used for variable resolution and saved request scripts without changing the workspace active environment.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorNo
sourceYes
statusNo
headersNo
bodyTypeNo
sizeBytesNo
truncatedNo
durationMsNo
statusTextNo
bodyPreviewNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed3 schema fields changedv0.9.3
    • changedInput schema / properties / timeoutMs / description
      Previous value: -"Optional timeout in milliseconds. Maximum 60000ms (60 seconds)."New value: +"Optional timeout in milliseconds. Omitted or null defaults to 60000ms; 0 means unlimited; positive values are used exactly."
    • addedInput schema / properties / timeoutMs / minimum
      Added value: +0
    • changedInput schema / properties / timeoutMs / type
      Previous value: -"number"New value: +[
      +  "integer",
      +  "null"
      +]
  2. Changed1 schema field changedv0.9.1
    • changedInput schema / properties / environmentId / description
      Previous value: -"Optional environment ID (currently uses the workspace default environment)."New value: +"Optional per-call environment override. It is used for variable resolution and saved request scripts without changing the workspace active environment."
  3. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

The description adds substantial behavior beyond the sparse annotations: non-2xx responses return structured status/body data instead of MCP tool failure, sensitive headers/cookies/URL tokens/JSON body fields are masked, and environment-specific method restrictions are disclosed. This materially changes how an agent interprets results and plans calls, and nothing contradicts the annotations.

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?

Four sentences, front-loaded with the core action and mode distinction, followed by the troubleshooting use case, environment restrictions, and behavior notes. It's dense but every sentence earns its place; the last sentence packs two behaviors (error handling and masking) into one clause, slightly reducing scannability.

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 tool's complexity (11 params, two modes, environment-dependent behavior) and the existence of an output schema, the description covers the critical non-obvious behaviors: structured non-2xx responses, masking, and per-environment method rules. Minor gaps remain, such as not explaining that saved request scripts run or elaborating on the mutation implications, but annotations (readOnlyHint=false) partially cover that.

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 coverage is 100%, with each parameter already documented (e.g., timeoutMs defaults to 60000ms, requestId should be omitted when sending method/url directly). The description adds the two-mode framing and groups parameters as method/url/headers/query/body, but the schema already carries most of the semantic weight, so the description's added value is marginal.

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 ('Sends') and a clear resource (API requests) with two precise modes: replaying a saved request by requestId or sending an ad-hoc request via method/url/headers/query/body. This distinguishes it from the sibling CRUD tools (create_request, update_request, delete_request, get_request), which manage request definitions rather than execute them.

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?

The description gives an explicit use case ('Use it to reproduce API failures during agent troubleshooting') and explains environment-specific constraints (dev allows all methods, test marks mutating as write risk, prod restricts to GET/HEAD/OPTIONS). It doesn't explicitly name alternatives or say when not to use it, but the execution-vs-management distinction from siblings is clear enough.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zyqzyq/Unfour'

If you have feedback or need assistance with the MCP directory API, please join our Discord server