Skip to main content
Glama

get_account

Read-onlyIdempotent

Retrieve a single account by providing its ID. Get account details directly from Eduframe.

Instructions

Get a single account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the account to retrieve

Implementation Reference

  • Handler function for the get_account tool. Takes an account ID, calls apiGet to fetch the account from /accounts/{id}, logs the response, and formats it using formatShow.
    async ({ id }) => {
      try {
        const record = await apiGet<EduframeRecord>(`/accounts/${id}`);
        void logResponse("get_account", { id }, record);
        return formatShow(record, "account");
      } catch (error) {
        return formatError(error);
      }
    },
  • Input schema for the get_account tool: requires a positive integer 'id' parameter.
    inputSchema: { id: z.number().int().positive().describe("ID of the account to retrieve") },
  • Registration of the get_account tool via server.registerTool inside the registerAccountTools function.
    server.registerTool(
      "get_account",
      {
        description: "Get a single account",
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the account to retrieve") },
      },
      async ({ id }) => {
        try {
          const record = await apiGet<EduframeRecord>(`/accounts/${id}`);
          void logResponse("get_account", { id }, record);
          return formatShow(record, "account");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • The apiGet helper that executes the actual GET request to the Eduframe API. Used by the get_account handler to fetch /accounts/{id}.
    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);
    }
  • The formatShow helper that formats a single account record into a human-readable CallToolResult. Used by the get_account handler.
    export function formatShow(record: EduframeRecord, resourceName: string): CallToolResult {
      return {
        content: [
          {
            type: "text",
            text: `${resourceName}:\n\n${formatJSON(record)}${RESPONSE_LOG_HINT}`,
          },
        ],
      };
    }
Behavior2/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds no extra behavioral context such as error handling, required permissions, or what is returned. It fails to add value beyond the annotations.

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 with no wasted words. It is concise, but slightly more context (e.g., what is returned) could be added without becoming 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?

For a simple read tool with one parameter and no output schema, the description is minimally adequate. However, it does not explain what the returned account object contains or any additional context about the operation.

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% coverage for the single parameter 'id', which is described as 'ID of the account to retrieve'. The description does not add additional meaning to the parameter, so a baseline score of 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 'Get a single account' uses a specific verb ('Get') and resource ('account') and clearly distinguishes from the sibling 'get_accounts' tool by specifying singular retrieval. It is completely unambiguous.

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 implies use for retrieving one account by ID, but does not explicitly state when to use this versus alternatives (e.g., 'get_accounts' for multiple accounts). No usage context, prerequisites, or exclusions are provided.

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