Skip to main content
Glama

get_planning_event

Read-onlyIdempotent

Retrieve a specific planning event record by providing its ID. Access detailed event data from the Eduframe system.

Instructions

Get an planning event record

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the planning event to retrieve

Implementation Reference

  • Handler function for get_planning_event tool - performs GET request to /planning/events/{id} and formats the response
    async ({ id }) => {
      try {
        const record = await apiGet<EduframeRecord>(`/planning/events/${id}`);
        void logResponse("get_planning_event", { id }, record);
        return formatShow(record, "planning event");
      } catch (error) {
        return formatError(error);
      }
    },
  • Input schema for get_planning_event - requires a positive integer 'id' parameter
    description: "Get an planning event record",
    annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
    inputSchema: { id: z.number().int().positive().describe("ID of the planning event to retrieve") },
  • Registration of get_planning_event tool on the MCP server with description, annotations, input schema, and handler
    server.registerTool(
      "get_planning_event",
      {
        description: "Get an planning event record",
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the planning event to retrieve") },
      },
      async ({ id }) => {
        try {
          const record = await apiGet<EduframeRecord>(`/planning/events/${id}`);
          void logResponse("get_planning_event", { id }, record);
          return formatShow(record, "planning event");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Registration function that registers all planning event tools including get_planning_event
    export function registerPlanningEventTools(server: McpServer): void {
      server.registerTool(
        "get_planning_events",
        {
          description: "Get all planning event records",
          annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
          inputSchema: {
            cursor: z.string().optional().describe("Cursor for fetching the next page of results"),
            per_page: z.number().int().positive().optional().describe("Number of results per page (default: 25)"),
          },
        },
        async ({ cursor, per_page }) => {
          try {
            const result = await apiList<EduframeRecord>("/planning/events", { cursor, per_page });
            void logResponse("get_planning_events", { cursor, per_page }, result);
            const toolResult = formatList(result.records, "planning events");
            if (result.nextCursor) {
              toolResult.content.push({ type: "text", text: `\nNext page cursor: ${result.nextCursor}` });
            }
            return toolResult;
          } catch (error) {
            return formatError(error);
          }
        },
      );
    
      server.registerTool(
        "get_planning_event",
        {
          description: "Get an planning event record",
          annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
          inputSchema: { id: z.number().int().positive().describe("ID of the planning event to retrieve") },
        },
        async ({ id }) => {
          try {
            const record = await apiGet<EduframeRecord>(`/planning/events/${id}`);
            void logResponse("get_planning_event", { id }, record);
            return formatShow(record, "planning event");
          } catch (error) {
            return formatError(error);
          }
        },
      );
    
      server.registerTool(
        "delete_planning_event",
        {
          description: "Delete a planning event.",
          annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
          inputSchema: { id: z.number().int().positive().describe("ID of the planning event to delete") },
        },
        async ({ id }) => {
          try {
            const record = await apiDelete<EduframeRecord>(`/planning/events/${id}`);
            void logResponse("delete_planning_event", { id }, record);
            return formatDelete(record, "planning event");
          } catch (error) {
            return formatError(error);
          }
        },
      );
  • Helper function apiGet that performs the actual GET request to the Eduframe API - used by the handler
    export async function apiGet<T>(path: string, query?: Record<string, QueryValue>): Promise<T> {
      const { token } = getConfig();
      const url = buildUrl(path, query);
    
      const response = await fetch(url.toString(), {
        method: "GET",
        headers: buildHeaders(token),
      });
    
      return handleResponse<T>(response);
    }
Behavior3/5

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

The annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true, so the agent knows it is a safe read. The description adds no additional behavioral context (e.g., what happens if the ID does not exist, or any side effects). Thus it meets the baseline but adds no extra value.

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 a single sentence, very concise. However, it contains a grammatical error ('an planning event'), which slightly detracts from quality. It could be structured with slight improvements but is not verbose.

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 the tool's simplicity (single read parameter, clear annotations), the description is minimally adequate. However, there is no output schema, and the description does not explain what a 'planning event' is or what the return contains. For a simple get, this may suffice but could be more helpful.

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 covers the single required parameter 'id' with a clear description. Schema coverage is 100%, so the description does not need to add param info. The tool description adds no further semantic detail beyond the schema.

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 explicitly states the verb 'Get' and the resource 'planning event record', which is specific and distinguishes it from the sibling tool 'get_planning_events' (plural list) and other get tools. No ambiguity.

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?

The description provides no guidance on when to use this tool versus alternatives, nor any context about prerequisites or typical use cases. It only states the action without any usage hints.

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/martijnpieters/eduframe-mcp'

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