Skip to main content
Glama

set_attendance

Record or update a student's attendance for a specific meeting by supplying meeting and enrollment identifiers, selecting an attendance state, and optionally adding a comment.

Instructions

Set an attendance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
meeting_idYesUnique identifier of the meeting.
enrollment_idYesUnique identifier of the enrollment.
stateNoIndicator of the attendance state.
commentNoComment about this attendance.

Implementation Reference

  • Registration of the 'set_attendance' tool on the MCP server with input schema (meeting_id, enrollment_id, state, comment) and handler logic.
    server.registerTool(
      "set_attendance",
      {
        description: "Set an attendance.",
        annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
        inputSchema: {
          meeting_id: z.number().int().describe("Unique identifier of the meeting."),
          enrollment_id: z.number().int().describe("Unique identifier of the enrollment."),
          state: attendanceStateEnum.optional().describe("Indicator of the attendance state."),
          comment: z.string().optional().describe("Comment about this attendance."),
        },
      },
      async (body) => {
        try {
          const record = await apiPost<EduframeRecord>("/attendances/upsert", body);
          void logResponse("set_attendance", body, record);
          return formatCreate(record, "attendance");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Handler function for 'set_attendance': POSTs to /attendances/upsert, logs the response, and formats the created record.
    async (body) => {
      try {
        const record = await apiPost<EduframeRecord>("/attendances/upsert", body);
        void logResponse("set_attendance", body, record);
        return formatCreate(record, "attendance");
      } catch (error) {
        return formatError(error);
      }
    },
  • Zod enum schema for attendance states used as input validation for the 'state' field of set_attendance.
    const attendanceStateEnum = z.enum(["absent", "absent_with_leave", "attended", "blanco", "late"]);
  • Input schema for set_attendance tool defining required fields (meeting_id, enrollment_id) and optional fields (state, comment).
    inputSchema: {
      meeting_id: z.number().int().describe("Unique identifier of the meeting."),
      enrollment_id: z.number().int().describe("Unique identifier of the enrollment."),
      state: attendanceStateEnum.optional().describe("Indicator of the attendance state."),
      comment: z.string().optional().describe("Comment about this attendance."),
    },
  • Helper function apiPost used by set_attendance handler to POST to the /attendances/upsert API endpoint.
    export async function apiPost<T>(path: string, body: unknown): Promise<T> {
      const { token } = getConfig();
      const url = buildUrl(path);
    
      const response = await fetch(url.toString(), {
        method: "POST",
        headers: buildHeaders(token),
        body: JSON.stringify(body),
      });
    
      return handleResponse<T>(response);
    }
Behavior2/5

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

The description adds no behavioral context beyond the annotations. It does not disclose whether the tool creates or updates records, what side effects occur, or how it handles existing data. Annotations indicate it is not read-only, not destructive, and not idempotent, but the description fails to explain the actual behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence, but it is overly minimal and lacks necessary detail. It is not verbose but also not sufficiently informative.

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 tool has four parameters, no output schema, and limited annotations, the description is incomplete. It does not explain the effect of the tool, constraints on parameters, or the nature of the 'attendance' entity.

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?

Schema coverage is 100%, so the baseline is 3. The description provides no additional parameter context beyond what the schema already offers.

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

Purpose2/5

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

The description 'Set an attendance.' is vague; it restates the tool's name without specifying whether it creates or updates attendance records. It does not distinguish from sibling tools like get_attendances or clarify the operation type.

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. There is no mention of prerequisites, context, or when not to use it.

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