Skip to main content
Glama

jobs_get

Retrieve slide generation job status and results from 2slides.com by providing a job ID. Monitor progress until completion.

Instructions

Get job status/result by jobId from 2slides. Please check every 20 seconds until the status is success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdYes

Implementation Reference

  • The handler function for the 'jobs_get' MCP tool. It takes a jobId, makes a GET request to the 2slides API to retrieve job status/result, and returns the JSON response or error.
    mcp.tool('jobs_get', 'Get job status/result by jobId from 2slides. Please check every 20 seconds until the status is success.', JobArgs, async (args: any, _extra: any) => {
        const { jobId } = args as z.infer<z.ZodObject<typeof JobArgs>>;
        const url = `${API_BASE_URL}/api/v1/jobs/${encodeURIComponent(jobId)}`;
        const res = await fetch(url, {
          method: 'GET',
          headers: {
            Authorization: `Bearer ${API_KEY}`,
            'Content-Type': 'application/json',
          },
        });
        const data = await res.json();
        if (!res.ok) {
          return {
            content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
            isError: true,
          };
        }
        return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
    });
  • Zod schema for 'jobs_get' tool input parameters: requires a 'jobId' string.
    const JobArgs = { jobId: z.string().min(1) };
  • src/server.ts:59-77 (registration)
    Registration of the 'jobs_get' tool using mcp.tool(), including schema reference and inline handler.
    mcp.tool('jobs_get', 'Get job status/result by jobId from 2slides. Please check every 20 seconds until the status is success.', JobArgs, async (args: any, _extra: any) => {
        const { jobId } = args as z.infer<z.ZodObject<typeof JobArgs>>;
        const url = `${API_BASE_URL}/api/v1/jobs/${encodeURIComponent(jobId)}`;
        const res = await fetch(url, {
          method: 'GET',
          headers: {
            Authorization: `Bearer ${API_KEY}`,
            'Content-Type': 'application/json',
          },
        });
        const data = await res.json();
        if (!res.ok) {
          return {
            content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
            isError: true,
          };
        }
        return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
    });
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the polling behavior ('check every 20 seconds') and expected outcome ('until status is success'), which are valuable behavioral traits. However, it lacks details on error handling, timeout limits, or what happens if the job fails, leaving gaps in transparency.

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 appropriately sized and front-loaded, with the core purpose stated first and usage guidance following. Both sentences earn their place by providing essential information without redundancy, making it efficient and well-structured.

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?

Given no annotations, no output schema, and a simple input schema, the description is moderately complete. It covers the tool's purpose and polling behavior but lacks details on response format, error cases, or integration with sibling tools, leaving room for improvement in guiding an agent fully.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaning by specifying that the jobId parameter is used to retrieve status/result from 2slides, which clarifies its purpose beyond the schema's basic string validation. With 0% schema description coverage and only one parameter, this compensation is adequate, though it could detail format or source of jobId.

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 the verb ('Get') and resource ('job status/result'), specifying it retrieves information by jobId from 2slides. However, it doesn't explicitly differentiate from sibling tools like slides_generate or themes_search, which appear to be different operations rather than alternative status-checking methods.

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 provides implied usage guidance by mentioning 'Please check every 20 seconds until the status is success,' suggesting this tool is for polling job completion. However, it doesn't explicitly state when to use this tool versus alternatives or mention prerequisites like needing a valid jobId from another operation.

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/2slides/mcp-2slides'

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