Skip to main content
Glama
lithtrix

lithtrix-mcp

Official

lithtrix_blob_parse_status

Check the status of a blob parse operation by providing the blob ID and parse ID. Returns current progress or completion.

Instructions

GET /v1/blobs/{blob_id}/parse/{parse_id} — poll parse status. Requires LITHTRIX_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blob_idYesContent-addressed blob id (b_ + 16 hex chars)
parse_idYesParse operation UUID

Implementation Reference

  • Handler for lithtrix_blob_parse_status tool. Calls GET /v1/blobs/{blob_id}/parse/{parse_id} to poll parse status. Requires LITHTRIX_API_KEY. Takes blob_id and parse_id as input.
    server.tool(
      "lithtrix_blob_parse_status",
      "GET /v1/blobs/{blob_id}/parse/{parse_id} — poll parse status. Requires LITHTRIX_API_KEY.",
      {
        blob_id: blobIdSchema,
        parse_id: parseIdSchema,
      },
      async ({ blob_id, parse_id }) => {
        const apiKey = process.env.LITHTRIX_API_KEY;
        if (!apiKey) return missingApiKeyResponse();
    
        const path = `/v1/blobs/${encodeURIComponent(blob_id)}/parse/${encodeURIComponent(parse_id)}`;
        let response;
        try {
          response = await fetch(new URL(path, LITHTRIX_API_URL), {
            headers: { Authorization: `Bearer ${apiKey}` },
          });
        } catch (err) {
          return networkErrorResponse(err);
        }
        return apiJsonResponse(response);
      }
  • Input schema definitions used by lithtrix_blob_parse_status: blob_id must be 19 chars matching b_ + 16 hex chars, parse_id must be a UUID.
    const blobIdSchema = z
      .string()
      .length(19)
      .regex(/^b_[0-9a-f]{16}$/)
      .describe("Content-addressed blob id (b_ + 16 hex chars)");
    
    const parseIdSchema = z.string().uuid().describe("Parse operation UUID");
  • tools/parse.js:79-183 (registration)
    The registerParseTools function registers all parse-related tools on the MCP server, including lithtrix_blob_parse_status. Called from index.js line 49.
    export function registerParseTools(server) {
      server.tool(
        "lithtrix_blob_parse",
        "POST /v1/blobs/{blob_id}/parse — extract text/tables; set async=true for QStash. Optional callback_url in JSON body. Requires LITHTRIX_API_KEY.",
        {
          blob_id: blobIdSchema,
          async: z
            .boolean()
            .optional()
            .describe("When true, calls ?async=true (async parse + poll)"),
          callback_url: z
            .string()
            .url()
            .max(2048)
            .optional()
            .describe("HTTPS callback for async completion (public host)"),
        },
        async ({ blob_id, async: asyncFlag, callback_url }) => {
          const apiKey = process.env.LITHTRIX_API_KEY;
          if (!apiKey) return missingApiKeyResponse();
    
          const url = new URL(
            `/v1/blobs/${encodeURIComponent(blob_id)}/parse`,
            LITHTRIX_API_URL
          );
          if (asyncFlag) url.searchParams.set("async", "true");
    
          const body =
            callback_url !== undefined ? JSON.stringify({ callback_url }) : undefined;
    
          let response;
          try {
            response = await fetch(url.toString(), {
              method: "POST",
              headers: {
                Authorization: `Bearer ${apiKey}`,
                ...(body ? { "Content-Type": "application/json" } : {}),
              },
              body,
            });
          } catch (err) {
            return networkErrorResponse(err);
          }
          return apiJsonResponse(response);
        }
      );
    
      server.tool(
        "lithtrix_blob_parse_status",
        "GET /v1/blobs/{blob_id}/parse/{parse_id} — poll parse status. Requires LITHTRIX_API_KEY.",
        {
          blob_id: blobIdSchema,
          parse_id: parseIdSchema,
        },
        async ({ blob_id, parse_id }) => {
          const apiKey = process.env.LITHTRIX_API_KEY;
          if (!apiKey) return missingApiKeyResponse();
    
          const path = `/v1/blobs/${encodeURIComponent(blob_id)}/parse/${encodeURIComponent(parse_id)}`;
          let response;
          try {
            response = await fetch(new URL(path, LITHTRIX_API_URL), {
              headers: { Authorization: `Bearer ${apiKey}` },
            });
          } catch (err) {
            return networkErrorResponse(err);
          }
          return apiJsonResponse(response);
        }
      );
    
      server.tool(
        "lithtrix_blob_search",
        "GET /v1/blobs/search — semantic search over parsed chunks; shares quota with web search. Requires LITHTRIX_API_KEY.",
        {
          q: z.string().min(1).max(500).describe("Natural-language query"),
          limit: z.number().int().min(1).max(20).optional().describe("Max hits (1–20)"),
          threshold: z
            .number()
            .min(0)
            .max(1)
            .optional()
            .describe("Minimum similarity (0–1)"),
        },
        async ({ q, limit, threshold }) => {
          const apiKey = process.env.LITHTRIX_API_KEY;
          if (!apiKey) return missingApiKeyResponse();
    
          const url = new URL("/v1/blobs/search", LITHTRIX_API_URL);
          url.searchParams.set("q", q);
          if (limit !== undefined) url.searchParams.set("limit", String(limit));
          if (threshold !== undefined) url.searchParams.set("threshold", String(threshold));
    
          let response;
          try {
            response = await fetch(url.toString(), {
              headers: { Authorization: `Bearer ${apiKey}` },
            });
          } catch (err) {
            return networkErrorResponse(err);
          }
          return apiJsonResponse(response);
        }
      );
    }
  • Helper function used by the handler to parse and format the API response, including error handling.
    async function apiJsonResponse(response) {
      let body;
      try {
        body = await response.json();
      } catch {
        body = { message: `Invalid JSON (HTTP ${response.status})` };
      }
    
      if (!response.ok) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                error: body.message ?? `Lithtrix API error (HTTP ${response.status})`,
                error_code: body.error_code ?? "UNKNOWN",
                status: body.status,
              }),
            },
          ],
          isError: true,
        };
      }
    
      return {
        content: [{ type: "text", text: JSON.stringify(body, null, 2) }],
      };
    }
Behavior2/5

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

With no annotations provided, the description fails to disclose important behavioral aspects such as retry logic, expected status codes, rate limits, or what happens if the parse is still running. While 'GET' indicates read-only, details are lacking.

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 extremely concise with a single sentence containing the endpoint and a requirement. No wasted words.

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?

For a simple polling tool, the description provides the core functionality but omits details about response format, polling interval hints, and error scenarios. Given no output schema, more guidance would improve 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?

The input schema has 100% description coverage, so the parameters are already documented. The description does not add new meaning or context beyond the schema, maintaining baseline adequacy.

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 it is a GET endpoint to poll parse status, specifying the exact verb and resource. It distinguishes from the sibling lithtrix_blob_parse which likely initiates parsing.

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

Usage Guidelines4/5

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

The description implies usage for polling after initiating a parse (in contrast to lithtrix_blob_parse). However, it does not explicitly state when not to use it or mention alternatives beyond requiring an API key.

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/lithtrix/lithtrix-mcp'

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