Skip to main content
Glama

x_api_request

Send directed X API requests with the exact method and path, for testing endpoints or as a fallback when no dedicated tool exists. Credentials and scope must be specified.

Instructions

Generic X API request fallback. Use when: you know the exact path and method or need to test a route before using a dedicated generated tool. Do not use when: x_schema_discovery already identified a matching x_api_* tool; the dedicated tool is safer and clearer. Risk: variable. Required permissions and prerequisites: choose a scope that has usable stored credentials in Vault. Provide preferredAuthType when you need to force bearer, OAuth2 user, or OAuth1 user auth. Environment-selection behavior: scopeTenantId plus scopeUserId or scopeAccountId resolve the principal credential source. If no specific scope is provided, the server default scope is used. Parameter formats and constraints: method and path are required; query and headers are JSON objects; body is JSON; multipartForm is only for multipart endpoints. Expected response shape: { ok, status, data: { method, path, url, status, contentType, authType, data } } Common failure conditions: unsupported auth type for the chosen stored profile, missing credentials, rate limits, or invalid path/body combinations. Example: {"method":"GET","path":"/2/users/by/username/xdevelopers","scopeTenantId":"default","scopeUserId":"default"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNo
pathYes
queryNo
methodYes
headersNo
scopeUserIdNo
credentialKeyNo
multipartFormNo
scopeTenantIdNo
scopeAccountIdNo
authorizationKeyNo
preferredAuthTypeNo
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It covers risk, required permissions, environment-selection behavior, parameter formats, expected response shape, and common failure conditions. This is comprehensive and goes well beyond what the schema alone provides, especially for a generic HTTP tool where side effects and auth behavior are critical.

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?

The description is well-structured with labeled sections (Use when, Do not use when, Risk, Prerequisites, Environment-selection, Parameter formats, Expected response, Failure conditions, Example). Each line adds value, and the format makes information easy to scan. No redundant or filler content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (12 params, no output schema, no annotations), the description is remarkably complete. It covers when to use, how to use, what parameters mean, expected response structure, failure modes, and even includes an example. This is a fully self-contained description for a generic fallback tool.

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 0%, so the description must compensate. It explains the required fields (method, path), JSON object types for query/headers/body, the multipart exception, scope resolution semantics, and preferredAuthType. While authorizationKey and credentialKey are not explicitly described, the coverage of the core parameters is thorough and actionable, leaving only minor gaps.

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 this is a 'Generic X API request fallback' with the specific use case of knowing the exact path/method or testing a route. It explicitly distinguishes itself from dedicated x_api_* tools by positioning itself as a fallback, and the 'Do not use when' clause reinforces the differentiation. The verb 'request' and resource 'X API' make the purpose 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 explicit 'Use when' and 'Do not use when' guidance, naming x_schema_discovery and dedicated tools as safer alternatives. It also gives context on risk, prerequisites, and environment selection, making it clear when this fallback is appropriate versus when to avoid it.

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/LesterAJohn/X-mcp'

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