Skip to main content
Glama
lithtrix

lithtrix-mcp

Official

lithtrix_blob_list

Retrieve a paginated list of blob metadata using optional page and per_page parameters. Requires API key authentication.

Instructions

List blob metadata (GET /v1/blobs). Optional page and per_page. Requires LITHTRIX_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage (default 1)
per_pageNoPage size (1–100, default 50)

Implementation Reference

  • The tool handler for lithtrix_blob_list. Lists blob metadata via GET /v1/blobs with optional page and per_page query parameters. Calls the Lithtrix API with Bearer auth and returns the JSON response.
    server.tool(
      "lithtrix_blob_list",
      "List blob metadata (GET /v1/blobs). Optional page and per_page. Requires LITHTRIX_API_KEY.",
      {
        page: z.number().int().min(1).optional().describe("Page (default 1)"),
        per_page: z
          .number()
          .int()
          .min(1)
          .max(100)
          .optional()
          .describe("Page size (1–100, default 50)"),
      },
      async ({ page, per_page }) => {
        const apiKey = process.env.LITHTRIX_API_KEY;
        if (!apiKey) return missingApiKeyResponse();
    
        const url = new URL("/v1/blobs", LITHTRIX_API_URL);
        if (page !== undefined) url.searchParams.set("page", String(page));
        if (per_page !== undefined) url.searchParams.set("per_page", String(per_page));
    
        let response;
        try {
          response = await fetch(url.toString(), {
            headers: { Authorization: `Bearer ${apiKey}` },
          });
        } catch (err) {
          return networkErrorResponse(err);
        }
        return apiJsonResponse(response);
      }
    );
  • Input schema for lithtrix_blob_list: optional 'page' (int >= 1) and 'per_page' (int 1-100, default 50).
    {
      page: z.number().int().min(1).optional().describe("Page (default 1)"),
      per_page: z
        .number()
        .int()
        .min(1)
        .max(100)
        .optional()
        .describe("Page size (1–100, default 50)"),
    },
  • index.js:48-48 (registration)
    Registration of all blob tools (including lithtrix_blob_list) via registerBlobTools(server) call.
    registerBlobTools(server);
  • tools/blobs.js:133-250 (registration)
    The registerBlobTools function that registers lithtrix_blob_list (and other blob tools) on the MCP server.
    export function registerBlobTools(server) {
      server.tool(
        "lithtrix_blob_upload",
        "Upload binary bytes via PUT /v1/blobs (raw body + Content-Type). " +
          "Decode base64 from content_base64. For large files prefer direct HTTP multipart/raw PUT. " +
          "Requires LITHTRIX_API_KEY. Subject to BLOB_MAX_UPLOAD_BYTES and BLOB_STORAGE_LIMIT.",
        {
          content_base64: z
            .string()
            .min(1)
            .describe("Standard base64-encoded file bytes (no data: URL prefix)"),
          content_type: z
            .string()
            .min(1)
            .max(255)
            .describe("MIME type sent as Content-Type (e.g. application/pdf)"),
          filename: z
            .string()
            .max(512)
            .optional()
            .describe("Optional display filename (sent as filename query on the request)"),
        },
        async ({ content_base64, content_type, filename }) => {
          const apiKey = process.env.LITHTRIX_API_KEY;
          if (!apiKey) return missingApiKeyResponse();
    
          let binary;
          try {
            binary = Buffer.from(content_base64, "base64");
          } catch (err) {
            return {
              content: [
                {
                  type: "text",
                  text: JSON.stringify({ error: `Invalid base64: ${err.message}` }),
                },
              ],
              isError: true,
            };
          }
    
          const url = new URL("/v1/blobs", LITHTRIX_API_URL);
          if (filename !== undefined) url.searchParams.set("filename", filename);
    
          let response;
          try {
            response = await fetch(url.toString(), {
              method: "PUT",
              headers: {
                Authorization: `Bearer ${apiKey}`,
                "Content-Type": content_type,
              },
              body: binary,
            });
          } catch (err) {
            return networkErrorResponse(err);
          }
          return apiJsonResponse(response);
        }
      );
    
      server.tool(
        "lithtrix_blob_download",
        "Download blob bytes (GET /v1/blobs/{blob_id}). Returns JSON with content_base64 and content_type. " +
          "Requires LITHTRIX_API_KEY.",
        { blob_id: blobIdSchema },
        async ({ blob_id }) => {
          const apiKey = process.env.LITHTRIX_API_KEY;
          if (!apiKey) return missingApiKeyResponse();
    
          const path = `/v1/blobs/${encodeURIComponent(blob_id)}`;
          let response;
          try {
            response = await fetch(new URL(path, LITHTRIX_API_URL), {
              headers: {
                Authorization: `Bearer ${apiKey}`,
                Accept: "*/*",
              },
            });
          } catch (err) {
            return networkErrorResponse(err);
          }
          return blobDownloadResult(response);
        }
      );
    
      server.tool(
        "lithtrix_blob_list",
        "List blob metadata (GET /v1/blobs). Optional page and per_page. Requires LITHTRIX_API_KEY.",
        {
          page: z.number().int().min(1).optional().describe("Page (default 1)"),
          per_page: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Page size (1–100, default 50)"),
        },
        async ({ page, per_page }) => {
          const apiKey = process.env.LITHTRIX_API_KEY;
          if (!apiKey) return missingApiKeyResponse();
    
          const url = new URL("/v1/blobs", LITHTRIX_API_URL);
          if (page !== undefined) url.searchParams.set("page", String(page));
          if (per_page !== undefined) url.searchParams.set("per_page", String(per_page));
    
          let response;
          try {
            response = await fetch(url.toString(), {
              headers: { Authorization: `Bearer ${apiKey}` },
            });
          } catch (err) {
            return networkErrorResponse(err);
          }
          return apiJsonResponse(response);
        }
      );
  • Helper function apiJsonResponse used by lithtrix_blob_list to parse and return the API response.
    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) }],
      };
    }
Behavior3/5

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

With no annotations, the description carries full burden. It mentions the HTTP method and required API key, but does not explicitly state it is read-only or describe side effects. It is adequate but lacks depth.

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?

Extremely concise: one sentence with the core action and a separate sentence for a prerequisite. No filler, front-loaded.

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

Completeness2/5

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

No output schema exists, and the description does not explain the return format or metadata fields. For a list operation, this is a significant gap.

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 schema already fully documents the parameters. The description simply restates they are optional, adding no new meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it lists blob metadata with optional pagination. It uses the verb 'list' and specifies the endpoint, making the purpose clear. However, it doesn't explicitly distinguish from sibling tools like 'lithtrix_blob_search' or 'lithtrix_blob_meta'.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives (e.g., search, meta). The description does not mention use cases, prerequisites, or when not to use 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/lithtrix/lithtrix-mcp'

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