Skip to main content
Glama

mavis_agent_info

Retrieve detailed information about an agent, including skills and system prompt.

Instructions

Get detailed info about a specific agent (skills, system prompt, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentNameYesAgent name

Implementation Reference

  • src/index.js:248-258 (registration)
    Registration of the 'mavis_agent_info' tool in the tools array. Defines its name, description, input schema (agentName required), and buildArgs function that constructs CLI args ['agent', 'info', agentName].
    {
      name: 'mavis_agent_info',
      description: 'Get detailed info about a specific agent (skills, system prompt, etc.)',
      inputSchema: z.object({
        agentName: z.string().describe('Agent name')
      }),
      buildArgs: ({ agentName }) => {
        if (!agentName) throw new Error('agentName is required');
        return ['agent', 'info', agentName];
      }
    },
  • Generic handler function 'runTool' that all tools use. For mavis_agent_info (no execFn), it calls execMavisJSON(['agent', 'info', agentName]) and returns JSON-stringified result as text content.
    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 }];
      });
    }
  • Zod input schema for the tool: requires a single string field 'agentName'.
    inputSchema: z.object({
      agentName: z.string().describe('Agent name')
    }),
  • Helper functions execMavis and execMavisJSON used to execute the mavis CLI binary. mavis_agent_info uses execMavisJSON (since no execFn is defined), spawning '/Users/cunning/.mavis/bin/mavis agent info <agentName>'.
    function execMavis(args, input = '') {
      return new Promise((resolve, reject) => {
        const SESSION_COMMANDS = new Set(['communication', 'session', 'spawn']);
        const sessionId = process.env.__MAVIS_PARENT_SESSION_ID;
        const subcmd = args[0];
        const needsSession = SESSION_COMMANDS.has(subcmd) && sessionId;
        const finalArgs = needsSession ? [...args, '--session', sessionId] : args;
        const proc = spawn(MAVIS_BIN, finalArgs, { stdio: ['pipe', 'pipe', 'pipe'] });
        let stdout = '';
        let stderr = '';
    
        proc.stdout.on('data', d => stdout += d.toString());
        proc.stderr.on('data', d => stderr += d.toString());
        proc.on('close', code => {
          if (code === 0) resolve(stdout.trim());
          else reject(new Error(stderr.split('\n')[0] || `exit code ${code}`));
        });
        proc.on('error', reject);
    
        if (input) proc.stdin.write(input), proc.stdin.end();
      });
    }
    
    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);
        }
      });
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as side effects, permissions, or response structure. It merely states it retrieves info, which is already obvious.

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 sentence with no redundant words, but it could benefit from slightly more structure or bullet points for clarity.

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?

For a simple info tool with one parameter and no output schema, the description is fairly complete. However, it omits details like error cases and the exact scope of 'detailed info'.

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% with a minimal description 'Agent name'. The tool's description does not add significant meaning beyond the schema, so baseline 3 is appropriate.

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?

The description clearly states the verb 'Get', the resource 'detailed info about a specific agent', and includes examples like skills and system prompt, distinguishing it from sibling tool 'mavis_agent_list'.

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 versus alternatives like 'mavis_agent_list'. The context implies using it after listing agents, but this is not stated.

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