Skip to main content
Glama

get_generation_status

Check the status of an asynchronous presentation generation job to determine if it completed or failed.

Instructions

Check the status of an asynchronous presentation generation job. Use this after generate_presentation until the status reaches completed or failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
generation_idYesGeneration job identifier returned by generate_presentation.

Implementation Reference

  • src/index.js:163-182 (registration)
    Registration of the 'get_generation_status' tool via server.registerTool, including its schema (input: generation_id) and a handler that delegates to callRemoteTool.
    server.registerTool(
      "get_generation_status",
      {
        description:
          "Check the status of an asynchronous presentation generation job. Use this after generate_presentation until the status reaches completed or failed.",
        inputSchema: {
          generation_id: z
            .string()
            .min(1)
            .describe("Generation job identifier returned by generate_presentation."),
        },
      },
      async (args) => {
        try {
          return await callRemoteTool("get_generation_status", args);
        } catch (error) {
          return normalizeError(error);
        }
      },
    );
  • Input schema for the tool: requires a single string parameter 'generation_id' (min length 1).
    inputSchema: {
      generation_id: z
        .string()
        .min(1)
        .describe("Generation job identifier returned by generate_presentation."),
    },
  • Handler function for get_generation_status that calls the remote tool via callRemoteTool with error normalization.
    async (args) => {
      try {
        return await callRemoteTool("get_generation_status", args);
      } catch (error) {
        return normalizeError(error);
      }
    },
  • The callRemoteTool helper that creates an MCP client, connects to the remote Alai endpoint, and calls the named tool with provided arguments.
    async function callRemoteTool(name, args) {
      const client = new Client(
        { name: "alai-mcp-wrapper", version: "1.0.2" },
        { capabilities: {} },
      );
      const transport = new StreamableHTTPClientTransport(new URL(REMOTE_MCP_URL), {
        requestInit: {
          headers: createRemoteHeaders(),
        },
      });
    
      try {
        await client.connect(transport);
        return await client.callTool({
          name,
          arguments: args,
        });
      } finally {
        await transport.close().catch(() => {});
        await client.close().catch(() => {});
      }
    }
  • The normalizeError helper that formats upstream errors into a standard MCP error response.
    function normalizeError(error) {
      const message =
        error instanceof Error ? error.message : "Unknown upstream error";
    
      return {
        content: [
          {
            type: "text",
            text: `Alai upstream request failed: ${message}`,
          },
          ...(authGuidance()
            ? [
                {
                  type: "text",
                  text: authGuidance(),
                },
              ]
            : []),
        ],
        isError: true,
      };
    }
Behavior3/5

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

With no annotations, the description carries full burden. It discloses that the job is asynchronous and implies polling is needed, but lacks details on response structure, possible statuses, or error handling. Basic disclosure is present but not comprehensive.

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 at two sentences, front-loading the purpose and usage guidance without any filler. Every word contributes meaning.

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 tool's simplicity (one parameter, polling for status), the description is largely complete. It covers purpose and usage timing. It could mention possible status values or retry logic, but overall adequate.

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 description coverage is 100% for the single parameter, which already states it is a generation job identifier. The tool description adds no further semantic value for the parameter, so baseline 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 tool's purpose: checking the status of an asynchronous presentation generation job. It specifies the resource (generation job) and action (check status), and distinguishes it from sibling tools like generate_presentation.

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 explicitly tells the agent to use this after generate_presentation and until the status reaches completed or failed, providing clear temporal guidance. However, it does not mention alternatives 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/getalai/alai-mcp-server'

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