Skip to main content
Glama

get_inbox

Retrieve inbox details and a list of received emails for a given inbox ID, enabling verification of incoming messages and extraction of codes.

Instructions

Get inbox details and list of received emails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inbox_idYesThe inbox ID

Implementation Reference

  • Registration of the 'get_inbox' tool via server.tool(), with its name, description, schema (inbox_id), and handler.
    server.tool(
      "get_inbox",
      "Get inbox details and list of received emails.",
      {
        inbox_id: z.string().describe("The inbox ID"),
      },
      async ({ inbox_id }) => {
        const result = await blipFetch(`/v1/inboxes/${inbox_id}`);
        return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
      }
    );
  • Handler function that calls blipFetch to GET /v1/inboxes/{inbox_id} and returns JSON result.
    async ({ inbox_id }) => {
      const result = await blipFetch(`/v1/inboxes/${inbox_id}`);
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • Input schema: inbox_id (required z.string) parameter validated by Zod.
    {
      inbox_id: z.string().describe("The inbox ID"),
    },
  • Helper function blipFetch used by the handler to make authenticated API calls to the Blip API.
    async function blipFetch(
      path: string,
      options: RequestInit = {}
    ): Promise<unknown> {
      const url = `${API_URL}${path}`;
      const res = await fetch(url, {
        ...options,
        headers: {
          Authorization: `Bearer ${API_KEY}`,
          "Content-Type": "application/json",
          ...options.headers,
        },
      });
    
      if (!res.ok) {
        const body = await res.text();
        throw new Error(`Blip API error ${res.status} on ${options.method || "GET"} ${path}: ${body}`);
      }
    
      if (res.status === 204) return null;
      return res.json();
    }
Behavior3/5

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

No annotations provided. Description implies a read operation but does not explicitly state safety or side effects. Adequate for a simple retrieval, but could be more explicit.

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?

Single sentence captures tool's purpose without fluff. Front-loaded and efficient.

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

Completeness4/5

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

Given the simplicity (1 param, no output schema), description adequately states what is returned. Lacks specifics on structure of inbox details or email list, but sufficient for the tool's scope.

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?

Schema covers 100% of parameters with description 'The inbox ID'. Description adds no extra meaning beyond schema; baseline score applies.

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?

Description clearly states 'Get inbox details and list of received emails', using a specific verb and resource. It distinguishes from siblings like list_inboxes (lists all) and read_email (reads a single email).

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?

No explicit when-to-use or alternatives; usage is implied by the name and purpose, but no guidance on when not to use or in comparison to read_email or wait_for_email.

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/blipemail/blip'

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