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:
Path params (:id, :slug) — find actual values in component data, props, route params, or hardcoded in the store action
Query params — inspect the Vuex action, API service call, or component for the params/query object passed to the request
Request body — check what payload is dispatched or composed in the action
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
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Request body (for POST/PUT/PATCH). Object auto-serialized as JSON. | |
| query | No | Query string parameters as key-value pairs | |
| method | Yes | HTTP method | |
| headers | No | Additional request headers (one-time, merged with configured globals) | |
| endpoint | Yes | Path only (e.g. "/users"). Resolved to: https://api.example.com/v1/... |