Skip to main content
Glama

http_request

Perform an HTTP request and return a compact schema of the response, enabling token-efficient data extraction by fetching only needed fields via jq masks.

Instructions

Perform an HTTP request and return a compact schema of the response, not the full body.

Default flow (use this for any non-trivial response): (1) call http_request to get { schema, cache_id }; (2) call http_read with cache_id and a jq mask to extract only the field(s) you need. This keeps your context small even on multi-MB responses.

body_mode controls how much of the body comes back inline: schema (no body — schema only) head (schema + truncated preview of arrays/strings — middle ground) inline (schema + full body — costly; capped by PEEK_INLINE_BODY_CAP) auto (default — server picks based on byte thresholds) Reach for inline ONLY when body is known-small AND every field is needed; a 200KB JSON inlined is ~12K tokens of context for data you may never use.

Multipart uploads stream files via chunked transfer encoding (no Content-Length). Most servers accept this; some legacy proxies / primitive test servers reject it.

Cookbook: • Explore an unknown endpoint: http_request {method: "GET", url} → schema shows what is there http_read {cache_id, mask: ".data | map({id, name})"} • Top 10 GitHub issues by comment count: http_request {method: "GET", url: "https://api.github.com/repos/OWNER/REPO/issues"} http_read {cache_id, mask: "sort_by(-.comments)[:10] | .[] | {id, title, comments}"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodYes
urlYesAbsolute URL.
queryNo
headersNo
bodyNoObject → JSON; string → text/plain; mutually exclusive with body_raw and multipart.
body_rawNoRaw payload; pair with content_type.
multipartNo
content_typeNoOverride Content-Type.
timeout_msNoDefault 30000.
follow_redirectsNoDefault true (max 10 hops).
tls_insecureNoDefault false.
schema_formatNoDefault 'paths'.
body_modeNoDefault 'auto'. schema | head | inline | auto.
download_toNoStream body to file (skips cache).
Behavior5/5

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

No annotations provided, but the description fully covers behavior: returns schema and cache_id by default, body_mode controls body inclusion, multipart uses chunked encoding (may fail on legacy proxies). It does not contradict annotations (none provided).

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?

Well-structured and front-loaded with key information, but slightly lengthy. However, every sentence serves a purpose, and the cookbook adds practical value without being verbose.

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 (14 parameters, nested objects, no output schema), the description covers essential usage patterns, workflow, and caveats. Could mention error handling or authentication, but overall adequate.

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 description coverage is 71%, so baseline is 3. The description adds significant value by explaining body_mode in detail and the overall request flow, going beyond schema descriptions.

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 clearly states the tool performs HTTP requests and returns a compact schema of the response, not the full body. It distinguishes itself from siblings http_read and http_inspect by explaining the two-step workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicitly describes the default two-step flow and provides a cookbook with specific examples. It also advises when to use body_mode options sparingly, especially inline mode, and notes multipart streaming constraints.

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

Install Server

Other Tools

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/ed-smartass/mcp-peek'

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