Skip to main content
Glama

get_webhook_notifications_failed

Read-onlyIdempotent

Retrieve failed webhook notifications for a specific webhook, with options to filter by date range and paginate results.

Instructions

Get the failed webhook notifications

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webhook_idYesID of the parent resource
cursorNoCursor for fetching the next page of results
per_pageNoNumber of results per page (default: 25)
startNoOnly show failed notifications created after this date and time
endNoOnly show failed notifications starting before this date and time

Implementation Reference

  • The handler function that executes the tool logic. It calls apiList on GET /webhooks/{webhook_id}/notifications/failed with query params (cursor, per_page, start, end), logs the response, formats the results via formatList, and handles errors via formatError.
    server.registerTool(
      "get_webhook_notifications_failed",
      {
        description: "Get the failed webhook notifications",
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
        inputSchema: {
          webhook_id: z.number().int().positive().describe("ID of the parent resource"),
          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)"),
          start: z.string().optional().describe("Only show failed notifications created after this date and time"),
          end: z.string().optional().describe("Only show failed notifications starting before this date and time"),
        },
      },
      async ({ webhook_id, cursor, per_page, start, end }) => {
        try {
          const result = await apiList<EduframeRecord>(`/webhooks/${webhook_id}/notifications/failed`, {
            cursor,
            per_page,
            start,
            end,
          });
          void logResponse("get_webhook_notifications_failed", { webhook_id, cursor, per_page, start, end }, result);
          const toolResult = formatList(result.records, "webhook notifications");
          if (result.nextCursor) {
            toolResult.content.push({ type: "text", text: `\nNext page cursor: ${result.nextCursor}` });
          }
          return toolResult;
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Input schema definition using Zod. Required: webhook_id (positive integer). Optional: cursor (string), per_page (positive integer), start (string date), end (string date).
    inputSchema: {
      webhook_id: z.number().int().positive().describe("ID of the parent resource"),
      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)"),
      start: z.string().optional().describe("Only show failed notifications created after this date and time"),
      end: z.string().optional().describe("Only show failed notifications starting before this date and time"),
    },
  • Registration of the tool via server.registerTool with name 'get_webhook_notifications_failed'. The function registerWebhookNotificationTools is imported and called from src/tools/index.ts (line 61, 124) in the registerAllTools function.
    export function registerWebhookNotificationTools(server: McpServer): void {
      server.registerTool(
        "get_webhook_notifications_failed",
        {
          description: "Get the failed webhook notifications",
          annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
          inputSchema: {
            webhook_id: z.number().int().positive().describe("ID of the parent resource"),
            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)"),
            start: z.string().optional().describe("Only show failed notifications created after this date and time"),
            end: z.string().optional().describe("Only show failed notifications starting before this date and time"),
          },
        },
        async ({ webhook_id, cursor, per_page, start, end }) => {
          try {
            const result = await apiList<EduframeRecord>(`/webhooks/${webhook_id}/notifications/failed`, {
              cursor,
              per_page,
              start,
              end,
            });
            void logResponse("get_webhook_notifications_failed", { webhook_id, cursor, per_page, start, end }, result);
            const toolResult = formatList(result.records, "webhook notifications");
            if (result.nextCursor) {
              toolResult.content.push({ type: "text", text: `\nNext page cursor: ${result.nextCursor}` });
            }
            return toolResult;
          } catch (error) {
            return formatError(error);
          }
        },
      );
    }
  • The apiList helper function used to perform the paginated GET request to the Eduframe API. It handles authentication, URL building, fetching, response validation, and cursor-based pagination.
    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 declare readOnlyHint=true and idempotentHint=true, so the tool is a safe read operation. The description adds no additional behavioral context beyond what is implied by the name and parameters (pagination, date filtering). No deeper details like ordering, failure reasons, or rate limits are given.

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 short sentence, which is concise and to the point. However, it could be slightly expanded to include critical behavioral notes 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?

Given the simplicity of the tool (a filtered list retrieval with annotations providing safety guarantees), the description is minimally adequate. However, the lack of an output schema and the absence of any explanation about what 'failed' means or how notifications are ordered leaves some gaps for an AI agent.

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 description coverage is 100%, so the schema already explains all parameters. The description does not add any semantic value beyond the parameter names described in the schema, e.g., it does not clarify what constitutes a 'failed' notification or the format of start/end dates.

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 'Get the failed webhook notifications' clearly indicates the tool retrieves failed notifications, with a specific verb and resource. However, it does not distinguish from sibling tools like get_webhook and get_webhooks, which might cause confusion, but the specificity of 'failed' provides some differentiation.

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 context about prerequisites, conditions for use, or when not to use it (e.g., if no failures exist). Usage is left entirely to the agent's inference.

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