Skip to main content
Glama

remove_hook

Remove a registered hook by ID to manage quantum-inspired secret manager connections and prevent API key leaks.

Instructions

Remove a registered hook by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesHook ID to remove

Implementation Reference

  • Implementation of the logic to remove a hook by its ID from the registry.
    export function removeHook(id: string): boolean {
      const registry = loadRegistry();
      const before = registry.hooks.length;
      registry.hooks = registry.hooks.filter((h) => h.id !== id);
      if (registry.hooks.length < before) {
        saveRegistry(registry);
        return true;
      }
      return false;
    }
  • MCP tool definition and handler for "remove_hook".
      "remove_hook",
      "Remove a registered hook by ID.",
      {
        id: z.string().describe("Hook ID to remove"),
      },
      async (params) => {
        const removed = removeHook(params.id);
        return text(
          removed ? `Removed hook ${params.id}` : `Hook "${params.id}" not found`,
          !removed,
        );
      },
    );

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/I4cTime/quantum_ring'

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