Skip to main content
Glama

get-chart

Retrieve a specific chart from the PI Dashboard using its unique ID to access and display data visualizations.

Instructions

Get a chart by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesChart ID

Implementation Reference

  • The handler function that executes the get-chart tool: fetches the chart by ID via authenticatedRequest, returns formatted JSON details or an error response.
    }, async ({ id }) => {
        try {
            const chart = await authenticatedRequest(`/charts/${id}`);
            return {
                content: [{
                        type: "text",
                        text: `Chart details:\n${JSON.stringify(chart, null, 2)}`
                    }]
            };
        }
        catch (error) {
            return {
                isError: true,
                content: [{ type: "text", text: `Error fetching chart: ${getErrorMessage(error)}` }]
            };
        }
    });
  • Input schema definition for the get-chart tool using Zod: requires a numeric 'id' parameter for the chart ID.
    id: z.number().describe("Chart ID")
  • build/index.js:795-795 (registration)
    Registration of the 'get-chart' tool on the MCP server, specifying name, description, and linking to schema and handler.
    server.tool("get-chart", "Get a chart by ID", {
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states 'Get a chart by ID' but doesn't disclose behavioral traits such as authentication requirements, error handling (e.g., if ID is invalid), rate limits, or what 'Get' returns (e.g., JSON data, image). This leaves significant gaps for an agent to understand how to invoke it correctly.

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 and front-loaded with 'Get a chart by ID', which is a single, clear sentence. There is no wasted text or redundancy, making it efficient for quick understanding.

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 complexity of a retrieval tool with no annotations and no output schema, the description is incomplete. It doesn't explain what is returned (e.g., chart data, metadata), authentication needs, or error cases. For a tool that likely interacts with a charting system, this lacks essential context for proper use.

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, with the 'id' parameter documented as 'Chart ID'. The description adds no meaning beyond this, as it only repeats 'by ID' without clarifying format or constraints. With high schema coverage, the baseline is 3, as the schema does the heavy lifting.

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

Purpose3/5

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

The description 'Get a chart by ID' clearly states the verb ('Get') and resource ('chart'), but it's vague about what 'Get' entails—whether it retrieves metadata, data, or the full chart object. It distinguishes from siblings like 'list-charts' (which lists multiple) and 'delete-chart' (which removes), but lacks specificity on the retrieval scope.

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 is provided on when to use this tool versus alternatives. For example, it doesn't specify prerequisites like authentication or session setup, nor does it compare to 'list-charts' for browsing or 'export-chart' for downloading. The description implies usage by ID but offers no context on when this is appropriate.

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/mingzilla/pi-api-mcp-server'

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