Skip to main content
Glama

get_attendances

Read-onlyIdempotent

Retrieve attendance records with optional filtering by meeting ID and pagination control.

Instructions

Get all attendance records

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoCursor for fetching the next page of results
per_pageNoNumber of results per page (default: 25)
meeting_idNoFilter attendances on meeting_id

Implementation Reference

  • The async handler function that executes the 'get_attendances' tool logic. It calls apiList to GET /attendances with optional cursor, per_page, and meeting_id parameters, logs the response, formats the results, and returns next-cursor pagination info.
      async ({ cursor, per_page, meeting_id }) => {
        try {
          const result = await apiList<EduframeRecord>("/attendances", { cursor, per_page, meeting_id });
          void logResponse("get_attendances", { cursor, per_page, meeting_id }, result);
          const toolResult = formatList(result.records, "attendances");
          if (result.nextCursor) {
            toolResult.content.push({ type: "text", text: `\nNext page cursor: ${result.nextCursor}` });
          }
          return toolResult;
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Input schema for the 'get_attendances' tool, defining fields: cursor (optional string), per_page (optional positive int), meeting_id (optional int). Annotations mark it as read-only, non-destructive, idempotent.
    {
      description: "Get all attendance 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)"),
        meeting_id: z.number().int().optional().describe("Filter attendances on meeting_id"),
      },
  • Registration of the 'get_attendances' tool via server.registerTool() inside the registerAttendanceTools function.
    server.registerTool(
      "get_attendances",
      {
        description: "Get all attendance 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)"),
          meeting_id: z.number().int().optional().describe("Filter attendances on meeting_id"),
        },
      },
      async ({ cursor, per_page, meeting_id }) => {
        try {
          const result = await apiList<EduframeRecord>("/attendances", { cursor, per_page, meeting_id });
          void logResponse("get_attendances", { cursor, per_page, meeting_id }, result);
          const toolResult = formatList(result.records, "attendances");
          if (result.nextCursor) {
            toolResult.content.push({ type: "text", text: `\nNext page cursor: ${result.nextCursor}` });
          }
          return toolResult;
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • The registerAttendanceTools function is included in the tools array that is iterated by registerAllTools to register all tools on the MCP server.
    const tools: Array<(server: McpServer) => void> = [
      registerAccountTools,
      registerAffiliationTools,
      registerAttendanceTools,
  • The apiList helper function used by the handler to perform a GET request to the Eduframe API, returning typed records and a nextCursor from the Link header.
    export async function apiList<T>(path: string, query?: Record<string, QueryValue>): Promise<ListResult<T>> {
      const { token } = getConfig();
      const url = buildUrl(path, query);
    
      const response = await fetch(url.toString(), {
        method: "GET",
        headers: buildHeaders(token),
      });
    
      await checkResponse(response);
    
      const records = (await response.json()) as T[];
      const nextCursor = parseNextCursor(response.headers.get("Link"));
    
      return { records, nextCursor };
    }
Behavior3/5

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

Annotations already indicate the tool is read-only, idempotent, and non-destructive, which aligns with the description. The description does not add behavioral details beyond the annotations, such as pagination behavior or data freshness, but it also does not contradict them.

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, concise sentence that efficiently conveys the core purpose. No extraneous information, though it could benefit from slightly more context without adding length.

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?

The tool lacks an output schema, and the description does not explain the return format or pagination mechanism. The phrase 'Get all attendance records' is misleading because pagination implies multiple calls may be needed.

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 provides descriptions for all three parameters (cursor, per_page, meeting_id) with 100% coverage. The description itself adds no further semantic meaning about these parameters, so it defaults to the schema's adequacy.

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 'Get all attendance records', identifying the action (get) and resource (attendance records). However, it does not differentiate from other 'get' tools like get_enrollments or get_meetings, lacking specificity about the scope or context.

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?

There is no guidance on when to use this tool versus alternatives, such as set_attendance or other listing tools. No context about prerequisites, filters, or typical use cases is 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