Skip to main content
Glama

http_request

Send arbitrary HTTP/REST requests to call open APIs that lack a dedicated integration. Configure method, URL, headers, query parameters, body, timeout, and redirects for direct API access.

Instructions

发送任意 HTTP/REST 请求,用于访问未单独接入的开放 API。

Args: method: HTTP 方法,支持 GET、POST、PUT、PATCH、DELETE、HEAD、OPTIONS。 url: 完整 URL,必须是 http:// 或 https:// 开头。 headers: 附加请求头,例如 {"Authorization": "Bearer ..."}。 params: URL 查询参数对象。 json_body: 以 JSON 发送的请求体(对象或数组)。 body: 原始字符串请求体,与 json_body 二选一。 timeout: 请求超时秒数。 max_bytes: 最多读取的响应字节数,超出会被截断。 follow_redirects: 是否跟随重定向;每一跳都会重新执行安全检查。

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": {
      "method": "<method>",
      "url": "<url>"
    },
    "name": "http_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
bodyNo
methodYes
paramsNo
headersNo
timeoutNo
json_bodyNo
max_bytesNo
follow_redirectsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/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 burden, and it does real work: it flags side effects via supported methods (POST/PUT/PATCH/DELETE), states the URL scheme constraint, notes response truncation at max_bytes, and discloses that redirects are re-checked for safety on every hop. It omits auth/permission requirements beyond the headers example, rate limiting, and error behavior.

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?

A one-sentence summary is front-loaded, followed by a compact per-argument list with no filler. Every line corresponds to a parameter or a constraint, and nothing is repeated verbatim from the schema types.

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?

An output schema exists, so return-value explanation is not required, and parameter semantics are fully covered. What is missing for a fully generic, potentially destructive network tool is guidance on error/failure reporting and on the security-check model beyond the redirect note.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate entirely, and it does: all nine parameters are explained with meaning and constraints (method enum listed, URL must start with http:// or https://, headers example with Bearer token, json_body vs body mutual exclusivity, timeout in seconds, max_bytes truncation, redirect semantics). The mutual-exclusion rule for json_body/body is exactly the kind of information the schema alone cannot convey.

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?

States a concrete verb and resource ("发送任意 HTTP/REST 请求") and adds a routing clause ("用于访问未单独接入的开放 API") that implicitly separates it from dedicated siblings like web_fetch, github_get_file, or sqlite_query. It stops short of naming those alternatives explicitly, so it is clear rather than airtight.

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 clause about APIs "not separately integrated" gives a usable when-to-use rule, which is the main decision an agent faces given ~35 siblings. However, no when-not condition (e.g. prefer web_fetch for plain page retrieval) and no named alternative tools are given.

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