Skip to main content
Glama
lithtrix

lithtrix-mcp

Official

lithtrix_memory_get

Retrieve a stored memory by key to access persisted information across sessions and agents.

Instructions

Retrieve a stored memory by key (GET /v1/memory/{key}). Requires LITHTRIX_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesMemory key (1–128 chars: letters, digits, hyphen, underscore, dot, colon)

Implementation Reference

  • Handler function for lithtrix_memory_get: validates API key, sends GET /v1/memory/{key} to the Lithtrix API, and returns the JSON response.
      async ({ key }) => {
        const apiKey = process.env.LITHTRIX_API_KEY;
        if (!apiKey) return missingApiKeyResponse();
    
        const path = `/v1/memory/${encodeURIComponent(key)}`;
        let response;
        try {
          response = await fetch(new URL(path, LITHTRIX_API_URL), {
            headers: {
              Authorization: `Bearer ${apiKey}`,
              "Content-Type": "application/json",
            },
          });
        } catch (err) {
          return networkErrorResponse(err);
        }
        return apiJsonResponse(response);
      }
    );
  • Input schema for lithtrix_memory_get: accepts a single 'key' parameter with a 1-128 character alphanumeric pattern.
    {
      key: memoryKeySchema,
    },
  • memoryKeySchema reusable Zod schema: validates key format (1-128 chars, letters/digits/hyphen/underscore/dot/colon).
    const memoryKeySchema = z
      .string()
      .min(1)
      .max(128)
      .regex(/^[a-zA-Z0-9\-_.:]+$/)
      .describe(
        "Memory key (1–128 chars: letters, digits, hyphen, underscore, dot, colon)"
      );
  • Registration of lithtrix_memory_get tool via server.tool() in registerMemoryTools, called from index.js line 47.
    server.tool(
      "lithtrix_memory_get",
      "Retrieve a stored memory by key (GET /v1/memory/{key}). Requires LITHTRIX_API_KEY.",
      {
        key: memoryKeySchema,
      },
      async ({ key }) => {
        const apiKey = process.env.LITHTRIX_API_KEY;
        if (!apiKey) return missingApiKeyResponse();
    
        const path = `/v1/memory/${encodeURIComponent(key)}`;
        let response;
        try {
          response = await fetch(new URL(path, LITHTRIX_API_URL), {
            headers: {
              Authorization: `Bearer ${apiKey}`,
              "Content-Type": "application/json",
            },
          });
        } catch (err) {
          return networkErrorResponse(err);
        }
        return apiJsonResponse(response);
      }
    );
Behavior2/5

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

No annotations are provided, so the description must disclose all behavioral traits. It mentions auth requirement but does not explain error behavior (e.g., if key missing), idempotency (GET is safe), or result format. This is insufficient for a tool with no annotations.

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?

The description is two sentences, front-loaded with the primary action and resource. It is efficient with no redundancy, though the endpoint path could be considered unnecessary detail.

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?

Given the tool's simplicity (1 param, no output schema, no annotations), the description should at least hint at the return value or error handling. It only covers purpose and auth, leaving the agent guessing about what happens on success/failure.

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 already provides a detailed description of the 'key' parameter (length, pattern). The description adds no extra meaning beyond what the schema covers. With 100% schema coverage, a baseline score of 3 is appropriate.

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 the verb 'Retrieve' and the resource 'stored memory by key', and includes the HTTP method for clarity. It distinguishes from sibling tools like 'lithtrix_memory_set' (create/update) and 'lithtrix_memory_search' (search without key).

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

Usage Guidelines3/5

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

The description implies usage when you have a specific key, but does not explicitly state when to avoid or what alternatives exist (e.g., use search if no key). The sibling tool names provide some context but no explicit guidance.

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