Skip to main content
Glama

modal_logs

Retrieve recent logs from Modal applications to monitor execution and debug issues. Specify the app name and line count to analyze targeted output history.

Instructions

Get recent logs from a Modal app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_nameYesModal app name (e.g. "remotion-render", "voice-clone")
linesNoNumber of log lines to return (default: 50)

Implementation Reference

  • The handler function that executes the modal_logs tool. It uses execSync to run 'modal app logs <app_name>' CLI command and returns the log output.
    async handler({ app_name, lines = 50 }) {
      try {
        const out = execSync(
          `${MODAL_BIN} app logs ${app_name} 2>&1 | head -${lines}`,
          { timeout: 15000, shell: '/bin/zsh' }
        ).toString();
        return { app_name, logs: out };
      } catch (err) {
        throw new Error(`modal logs failed: ${err.message}`);
      }
    },
  • server.js:259-280 (registration)
    The complete tool registration for modal_logs in the TOOLS object. Includes description, inputSchema, and handler function.
    modal_logs: {
      description: 'Get recent logs from a Modal app.',
      inputSchema: {
        type: 'object',
        required: ['app_name'],
        properties: {
          app_name: { type: 'string', description: 'Modal app name (e.g. "remotion-render", "voice-clone")' },
          lines:    { type: 'number', description: 'Number of log lines to return (default: 50)' },
        },
      },
      async handler({ app_name, lines = 50 }) {
        try {
          const out = execSync(
            `${MODAL_BIN} app logs ${app_name} 2>&1 | head -${lines}`,
            { timeout: 15000, shell: '/bin/zsh' }
          ).toString();
          return { app_name, logs: out };
        } catch (err) {
          throw new Error(`modal logs failed: ${err.message}`);
        }
      },
    },
  • Input schema definition for modal_logs tool. Requires 'app_name' string and accepts optional 'lines' number parameter (default: 50).
    inputSchema: {
      type: 'object',
      required: ['app_name'],
      properties: {
        app_name: { type: 'string', description: 'Modal app name (e.g. "remotion-render", "voice-clone")' },
        lines:    { type: 'number', description: 'Number of log lines to return (default: 50)' },
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While it specifies 'recent' logs, it fails to define the time window (last 5 minutes? 24 hours?), output format, streaming behavior, or rate limiting. It omits critical safety/behavioral context expected for a logging tool without annotation coverage.

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 single-sentence description is highly efficient and front-loaded with the core action. However, given the lack of annotations and output schema, the extreme brevity contributes to underspecification rather than optimal information density.

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 being a simple two-parameter tool, the description lacks necessary context given the absence of annotations and output schema. It does not describe the return value format, log structure, or explain the 'recent' temporal boundary, leaving significant gaps for an agent attempting to interpret results.

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 both parameters ('app_name' and 'lines'), establishing a baseline of 3. The description adds no additional semantics, examples, or syntax guidance beyond what the schema already provides.

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 the verb ('Get'), resource ('logs'), and scope ('recent' from a 'Modal app'). However, it does not explicitly differentiate from sibling tools like 'modal_apps' or the render/voice-clone operations, though the resource type naturally distinguishes it.

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?

The description provides no guidance on when to use this tool versus alternatives (e.g., when to poll logs vs. checking render status via 'modal_render_get'). No prerequisites, conditions, or exclusion criteria are 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/IsaiahDupree/modal-mcp'

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