Skip to main content
Glama

mavis_cron_list

List all scheduled cron jobs for a specified agent. Retrieve the current cron schedule to manage periodic tasks in the Mavis system.

Instructions

List all scheduled cron jobs for an agent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentNameNoAgent name to list crons for (default: mavis)

Implementation Reference

  • execMavis: The underlying execution function that spawns the 'mavis' CLI binary and returns raw output. Used by runTool to execute all tool commands including mavis_cron_list.
    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();
      });
    }
  • Input schema for mavis_cron_list: an optional string field 'agentName' with default 'mavis'.
    inputSchema: z.object({
      agentName: z.string().optional().describe('Agent name to list crons for (default: mavis)')
    }),
  • src/index.js:325-332 (registration)
    Tool spec registration for 'mavis_cron_list' inside the tools array. Contains name, description, inputSchema, and buildArgs. No execFn is set, so runTool will use execMavisJSON (JSON output path).
    {
      name: 'mavis_cron_list',
      description: 'List all scheduled cron jobs for an agent.',
      inputSchema: z.object({
        agentName: z.string().optional().describe('Agent name to list crons for (default: mavis)')
      }),
      buildArgs: ({ agentName }) => ['cron', 'list', agentName || 'mavis']
    },
  • runTool: The generic tool runner that dispatches execution for all tools including mavis_cron_list. Since mavis_cron_list has no execFn, it uses execMavisJSON (JSON parsing path) and since there's no outputMode set (falsy), it falls through to JSON.stringify.
    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 }];
      });
    }
  • src/index.js:484-492 (registration)
    MavisServer registers tools via ListToolsRequestSchema and handles tool calls via CallToolRequestSchema. The toolMap is built from the tools array which includes mavis_cron_list.
    this.toolMap = new Map(tools.map(t => [t.name, t]));
    
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: tools.map(t => ({
        name: t.name,
        description: t.description,
        inputSchema: normalizeObjectSchema(t.inputSchema),
      })),
    }));
Behavior3/5

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

The description indicates a read operation with no side effects, which is adequate for a simple list tool. However, it does not disclose default behavior (e.g., the default agentName) or any limitations, though the schema provides the default value. With no annotations, the description could be more explicit.

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?

The description is a single, front-loaded sentence that conveys the core purpose efficiently without extraneous information. It is appropriately sized for a simple tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite the simplicity, the description lacks details about the return value (no output schema provided) and does not explain how the tool fits into the broader set of cron management tools. An agent may need to infer expected output from the tool name.

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?

The input schema has 100% description coverage for its single parameter, so the description adds no additional meaning beyond what the schema already provides. Baseline score of 3 applies.

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 'List' and the resource 'scheduled cron jobs for an agent', distinguishing it from sibling tools like mavis_cron_create and mavis_cron_delete. It is specific and unambiguous.

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 such as mavis_cron_create or mavis_cron_delete. The description does not mention conditions, prerequisites, or exclusions.

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