Skip to main content
Glama
NicolaSpadari

rest-api-mcp

rest_request

Execute HTTP requests to any REST API endpoint and return the full response, with automatic truncation for large payloads.

Instructions

Execute an HTTP request and return the full response (smart-truncated if large). Base URL: https://api.example.com/v1 | Token resolution: 1) project .env.mcp REST_BEARER_TOKEN, 2) MCP config env var, 3) session token via rest_set_token. If none found on 401/403, ask the user for a token.. Responses over 50000 bytes are smart-truncated. Use rest_describe for structure only, or rest_types for TypeScript interfaces. AUTONOMOUS CONTEXT RESOLUTION — When the endpoint comes from code analysis (feature-port, migration, Vuex store dispatch, API service file): DO NOT call blindly with missing parameters. First investigate the source code context:

  1. Path params (:id, :slug) — find actual values in component data, props, route params, or hardcoded in the store action

  2. Query params — inspect the Vuex action, API service call, or component for the params/query object passed to the request

  3. Request body — check what payload is dispatched or composed in the action

  4. If a value is purely dynamic (e.g. user-selected at runtime), use a representative test value and document the assumption. The goal is to make a real API call that returns representative data for type extraction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoRequest body (for POST/PUT/PATCH). Object auto-serialized as JSON.
queryNoQuery string parameters as key-value pairs
methodYesHTTP method
headersNoAdditional request headers (one-time, merged with configured globals)
endpointYesPath only (e.g. "/users"). Resolved to: https://api.example.com/v1/...
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the smart-truncation threshold (50000 bytes), the token resolution chain, and that the tool will ask the user for a token on 401/403. However, it does not explicitly warn about destructive side effects (e.g., DELETE, POST can modify data), though the method parameter implies this. The description is largely transparent but could be more explicit about potential data mutations.

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?

The description is relatively long but well-structured with clear sections (core purpose, token resolution, truncation, alternatives, autonomous context resolution). It is front-loaded with the most important information. While the autonomous context resolution section is verbose, it is necessary for the intended use case. The description could be slightly more concise, but it earns its length.

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?

Given the tool's complexity (5 parameters, no output schema, used for type extraction), the description covers base URL, token resolution, truncation, and sibling alternatives well. However, it lacks details about the response format (e.g., structure including status code, headers, body). The description says 'full response' but does not elaborate, which is a gap for a tool used to extract types from responses. The autonomous context resolution is thorough, but the lack of output schema information reduces completeness.

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%, so the baseline is 3. The description does not add significant new meaning to the parameters beyond what is already in the schema. It mentions path params, query params, and body in the context resolution section, but that is more about usage patterns than parameter semantics. The schema already provides clear descriptions for each parameter, so the description adds marginal value here.

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's purpose: 'Execute an HTTP request and return the full response'. It specifies the base URL, token resolution, and truncation behavior. It also explicitly distinguishes from siblings by directing users to 'rest_describe for structure only, or rest_types for TypeScript interfaces', making the tool's role in the family unambiguous.

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?

The description provides extensive usage guidance, including when to use alternatives (rest_describe, rest_types), token resolution strategy, and a detailed 'AUTONOMOUS CONTEXT RESOLUTION' section that instructs on how to investigate source code to find path params, query params, and body. It also advises on handling missing tokens (ask user) and using representative test values for dynamic inputs. This is explicit and actionable.

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/NicolaSpadari/rest_api_mcp'

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