Skip to main content
Glama

Xquik MCP Server

Execute Xquik API requests

execute
Destructive

Execute JavaScript against Xquik's X (Twitter) API. Reads cost 1 credit per result, 2 per analyzed post & 5 per article. 1,000 credits cost $0.12-$0.15. Writes cost 10 credits & posts from 30. Empty & failed reads are free. First use the search tool to find endpoints, parameters & response schemas. The sandbox declares interface XquikRequest { path: string; method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; query?: Record<string, string | number | boolean | undefined>; body?: unknown } declare const xquik: { result: unknown; request<T = unknown>(options: XquikRequest): Promise<T> }. request() returns the body as the API sends it, as the response schema from search describes it. code is an async arrow function. Fields use snake_case, & camelCase reads work too. A missing field reads as undefined & warns with the available keys. An absent field may need a request parameter. Output holds up to 24,000 characters, so large arrays fit after projection. A call ends at 55 s, waits included. A post can take 1 minute. Wait between calls. Paged reads return a cursor. Run independent reads with Promise.all. A result_id from an earlier answer lets a later call project its saved data through xquik.result. Authentication & idempotency headers are injected, so code holds no credentials. The sandbox has no filesystem or general network access. A failed request throws an Error naming its method, path, HTTP status & request ID, then the API's error body.

Example

async () => xquik.request({ path: "<path from search>" })

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": {
      "code": "<code>"
    },
    "name": "execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesJavaScript async arrow function that calls xquik.request().
result_idNoSaved result ID from an earlier answer. Leave it out unless an answer gave you one. Read its data through xquik.result.

Output Schema

NameRequiredDescriptionDefault
resultYesJSON returned by the executed async function.
warningsNoMissing field names mapped to available keys. Optional fields may require explicit request parameters. Absence does not prove the data is unavailable.
truncatedNoPresent when the answer was over 24,000 characters & result holds a shortened copy.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / truncated / properties / download_url / description
      Previous value: -"Link a person opens to download the whole answer as a CSV file."New value: +"Link a person opens to download the whole answer as CSV. Add &format=xlsx for Excel."
  2. Changed1 schema field changed
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Present when the answer was over 24,000 characters & result holds a shortened copy.",
      +  "properties": {
      +    "characters": {
      +      "description": "Characters in the whole answer.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "download_url": {
      +      "description": "Link a person opens to download the whole answer as a CSV file.",
      +      "format": "uri",
      +      "type": "string"
      +    },
      +    "next": {
      +      "description": "What to do with the shortened answer.",
      +      "type": "string"
      +    },
      +    "result_id": {
      +      "description": "Pass it to execute to read the whole answer through xquik.result.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "characters",
      +    "next"
      +  ],
      +  "type": "object"
      +}
  3. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare destructive/openWorld/not-idempotent, but the description adds far more: credit costs per read and write, that empty and failed reads are free, that auth and idempotency headers are injected so code holds no credentials, that the sandbox has no filesystem or network, a 55 s call limit with a possible 1 minute post, and the exact error shape thrown on failure. That is exactly the operational context annotations cannot express.

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?

Front-loaded with purpose then costs then the search-first instruction, and nearly every sentence carries usable information. It is dense and slightly run-on in the middle section on field casing and warnings, but nothing is redundant enough to cut.

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?

For a sandboxed code-execution tool with an output schema and full schema coverage, the description supplies everything an agent needs: the injected sandbox interface signature, cost model, timeout, output size cap, pagination cursors, and error behavior. No material gap remains.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning: `code` must be an async arrow function, fields use snake_case though camelCase reads work, a missing field yields undefined plus a warning naming available keys, and `result_id` exposes data through `xquik.result`. It stops short of explaining the result_id pattern grammar, which the schema already encodes.

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?

States a specific verb and resource: "Execute JavaScript against Xquik's X (Twitter) API." That is plainly distinct from the sibling tools docs, search, and whoami, which are read-only discovery helpers. An agent can tell what this tool does and how it differs from its siblings without opening any schema.

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 routes the agent to a prerequisite: "First use the search tool to find endpoints, parameters & response schemas." It also gives operational guidance – batch independent reads with Promise.all, wait between calls, use result_id to project saved data. That covers when to use this tool and how to coordinate it with the alternative.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.