Skip to main content
Glama

manage_webhooks

List or remove webhooks in the Fathom-fyi MCP server to monitor financial data triggers and manage notification endpoints.

Instructions

List all registered webhooks or remove one by ID. Use action "list" to see all webhooks with their conditions, trigger counts, and last triggered time. Use action "remove" with a webhook_id to delete a webhook.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes"list" to see all webhooks, "remove" to delete one
webhook_idNoWebhook ID to remove (required for action "remove")

Implementation Reference

  • Handler function for 'manage_webhooks' tool, which handles 'list' and 'remove' actions.
    async ({ action, webhook_id }) => {
      const gateError = gateTool('manage_webhooks');
      if (gateError) return { content: [{ type: 'text' as const, text: gateError }] };
    
      if (action === 'list') {
        const hooks = await listWebhooks();
        return { content: [{ type: 'text' as const, text: JSON.stringify({
          webhooks: hooks.map(h => ({
            id: h.id,
            url: h.url,
            label: h.label,
            conditions: h.conditions,
            cooldown_minutes: h.cooldown_minutes,
            trigger_count: h.trigger_count,
            last_triggered: h.last_triggered ?? 'never',
            created_at: h.created_at,
          })),
          count: hooks.length,
          agent_guidance: hooks.length === 0
            ? 'No webhooks registered. Use set_webhook to create one.'
            : `${hooks.length} webhook(s) active. Total triggers: ${hooks.reduce((s, h) => s + h.trigger_count, 0)}.`,
        }, null, 2) }] };
      }
    
      if (action === 'remove') {
        if (!webhook_id) {
          return { content: [{ type: 'text' as const, text: JSON.stringify({ error: 'webhook_id is required for remove action' }) }] };
        }
        const removed = await removeWebhook(webhook_id);
        return { content: [{ type: 'text' as const, text: JSON.stringify({
          status: removed ? 'removed' : 'not_found',
          webhook_id,
          agent_guidance: removed ? 'Webhook removed. It will no longer fire.' : 'Webhook ID not found. Use manage_webhooks with action "list" to see active webhooks.',
        }, null, 2) }] };
      }
    
      return { content: [{ type: 'text' as const, text: '{"error": "Invalid action"}' }] };
    },
  • src/index.ts:482-527 (registration)
    Registration of the 'manage_webhooks' tool with schema and description.
    server.tool(
      'manage_webhooks',
      'List all registered webhooks or remove one by ID. Use action "list" to see all webhooks with their conditions, trigger counts, and last triggered time. Use action "remove" with a webhook_id to delete a webhook.',
      {
        action: z.enum(['list', 'remove']).describe('"list" to see all webhooks, "remove" to delete one'),
        webhook_id: z.string().optional().describe('Webhook ID to remove (required for action "remove")'),
      },
      async ({ action, webhook_id }) => {
        const gateError = gateTool('manage_webhooks');
        if (gateError) return { content: [{ type: 'text' as const, text: gateError }] };
    
        if (action === 'list') {
          const hooks = await listWebhooks();
          return { content: [{ type: 'text' as const, text: JSON.stringify({
            webhooks: hooks.map(h => ({
              id: h.id,
              url: h.url,
              label: h.label,
              conditions: h.conditions,
              cooldown_minutes: h.cooldown_minutes,
              trigger_count: h.trigger_count,
              last_triggered: h.last_triggered ?? 'never',
              created_at: h.created_at,
            })),
            count: hooks.length,
            agent_guidance: hooks.length === 0
              ? 'No webhooks registered. Use set_webhook to create one.'
              : `${hooks.length} webhook(s) active. Total triggers: ${hooks.reduce((s, h) => s + h.trigger_count, 0)}.`,
          }, null, 2) }] };
        }
    
        if (action === 'remove') {
          if (!webhook_id) {
            return { content: [{ type: 'text' as const, text: JSON.stringify({ error: 'webhook_id is required for remove action' }) }] };
          }
          const removed = await removeWebhook(webhook_id);
          return { content: [{ type: 'text' as const, text: JSON.stringify({
            status: removed ? 'removed' : 'not_found',
            webhook_id,
            agent_guidance: removed ? 'Webhook removed. It will no longer fire.' : 'Webhook ID not found. Use manage_webhooks with action "list" to see active webhooks.',
          }, null, 2) }] };
        }
    
        return { content: [{ type: 'text' as const, text: '{"error": "Invalid action"}' }] };
      },
    );
  • Backend helpers 'listWebhooks' and 'removeWebhook' used by the tool handler.
    export async function removeWebhook(id: string): Promise<boolean> {
      await loadWebhooks();
      const removed = webhooks.delete(id);
      if (removed) await saveWebhooks();
      return removed;
    }
    
    export async function listWebhooks(): Promise<WebhookConfig[]> {
      await loadWebhooks();
      return Array.from(webhooks.values());
    }
Behavior3/5

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

No annotations provided, so description carries full disclosure burden. Adds valuable behavioral context by specifying list returns 'conditions, trigger counts, and last triggered time'. Mentions 'delete' for remove action, but omits safety details (permanent deletion, error handling, auth requirements) that annotations would typically cover.

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?

Three sentences with logical structure: overview, list details, remove details. No filler content. Slightly verbose with quoted action names and redundant 'webhook' references, but generally efficient for the dual-purpose explanation required.

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?

No output schema exists, so description must cover return values. Adequately describes list output (conditions, trigger counts, timestamps) but omits what remove returns (success confirmation, error states). Given 2-parameter simplicity, coverage is acceptable but incomplete.

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 has 100% coverage establishing baseline 3. Description reinforces parameter purposes ('list to see all', 'remove with webhook_id to delete') and adds context about list output fields, which helps understand the action's utility without repeating schema definitions verbatim.

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 dual functions (list/remove) and uses specific verbs with the resource 'webhooks'. The term 'registered webhooks' implicitly distinguishes this from sibling 'set_webhook' (creation), but lacks explicit cross-reference naming the alternative tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on parameter values: 'Use action list to...' and 'Use action remove with...'. Clearly maps actions to outcomes. Lacks explicit 'when not to use' guidance (e.g., not for creating webhooks) though this is implied.

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/0xHashy/fathom-fyi'

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