Skip to main content
Glama

mavis_hook_list

List all registered Mavis hooks to review pre and post execution triggers. Identify active hooks for debugging or auditing agent workflows.

Instructions

List all registered Mavis hooks (pre/post execution triggers).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The runTool function is the generic handler/executor for all tools including mavis_hook_list. It calls buildArgs() to construct CLI args (['hook', 'list']) and then runs execMavisJSON (default) since no execFn is specified, returning the JSON result.
    function runTool(spec, parsedArgs) {
      const { execFn, outputMode, stdin, buildArgs } = spec;
      const args = buildArgs(parsedArgs);
      const input = typeof stdin === 'function' ? stdin(parsedArgs) : stdin;
    
      const execPromise = execFn
        ? execMavis(args, input || '')
        : execMavisJSON(args);
    
      return execPromise.then(result => {
        const text = outputMode === OUTPUT_RAW
          ? (result || '')
          : JSON.stringify(result, null, 2);
        return [{ type: 'text', text }];
      });
    }
  • Defines mavis_hook_list tool spec including name, description, inputSchema (empty object — no parameters), and buildArgs which returns ['hook', 'list'] CLI command.
    {
      name: 'mavis_hook_list',
      description: 'List all registered Mavis hooks (pre/post execution triggers).',
      inputSchema: z.object({}),
      buildArgs: () => ['hook', 'list']
    },
  • src/index.js:473-484 (registration)
    MavisServer class constructor registers all tools (including mavis_hook_list) via ListToolsRequestSchema and CallToolRequestSchema handlers. The tools array is built at module scope and passed into the server.
    class MavisServer {
      constructor() {
        this.server = new Server(
          {
            name: 'mavis-mcp-server',
            version: '1.2.0',
            description: 'Mavis agent team — multi-agent orchestration via MCP',
          },
          { capabilities: { tools: {} } }
        );
    
        this.toolMap = new Map(tools.map(t => [t.name, t]));
  • execMavisJSON helper used by mavis_hook_list (since it has no execFn, the default path uses execMavisJSON to parse the JSON output from 'mavis hook list' CLI command).
    function execMavisJSON(args) {
      return execMavis(args).then(raw => {
        try {
          return JSON.parse(raw);
        } catch {
          const jsonStart = raw.indexOf('{');
          return JSON.parse(jsonStart >= 0 ? raw.slice(jsonStart) : raw);
        }
      });
    }
Behavior3/5

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

No annotations provided, so description must carry full burden. Simply states 'list all registered Mavis hooks'; no disclosure of authentication needs, rate limits, or side effects. However, as a list operation with no parameters, behavioral expectations are minimal.

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

Conciseness5/5

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

Single sentence, front-loaded with action and resource, no redundant words. Perfectly concise for a simple list tool.

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, but list tools often need to indicate return format (e.g., list of objects with fields). Description lacks details on what information each hook entry contains. Adequate for a minimal tool but not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters in input schema (0 params), so baseline is 4. Description adds value by clarifying what hooks are (pre/post execution triggers), which is not apparent from the empty schema.

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

Purpose5/5

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

Description clearly states verb 'List' and resource 'registered Mavis hooks' with parenthetical explanation of hooks as pre/post execution triggers, distinguishing it from sibling tools which cover agents, communications, configs, etc.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool vs alternatives, but since it's the only hook listing tool among siblings, usage is implied. No exclusions or prerequisites mentioned.

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/Cunning-Kang/mavis-mcp-server'

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