Skip to main content
Glama
RestDB

Codehooks.io MCP Server

by RestDB

logs

View system logs filtered by context, tail to n lines, or keep the log stream open.

Instructions

Show system logs for a space with filtering and follow options.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tailNoChop log to n lines
followNoKeep log stream open
contextNoFilter log on: jobhooks, queuehooks, routehooks, datahooks, auth

Implementation Reference

  • Zod schema definition for the 'logs' tool. Defines input validation with optional fields: tail (number, default 100), follow (boolean), and context (string for filtering on jobhooks, queuehooks, routehooks, datahooks, auth).
    const logSchema = z.object({
        tail: z.number().optional().default(100).describe("Chop log to n lines"),
        follow: z.boolean().optional().describe("Keep log stream open"),
        context: z.string().optional().describe("Filter log on: jobhooks, queuehooks, routehooks, datahooks, auth"),
    });
  • src/index.ts:476-488 (registration)
    Tool registration entry for 'logs' in the tools array. Declares the tool name, description ('Show system logs for a space with filtering and follow options'), and inputSchema mapping to the logSchema fields.
    {
        name: "logs",
        description: "Show system logs for a space with filtering and follow options.",
        schema: logSchema,
        inputSchema: {
            type: "object",
            properties: {
                tail: { type: "number", description: "Chop log to n lines", default: 100 },
                follow: { type: "boolean", description: "Keep log stream open" },
                context: { type: "string", description: "Filter log on: jobhooks, queuehooks, routehooks, datahooks, auth" }
            }
        }
    },
  • Handler implementation for the 'logs' tool. Builds CLI arguments for the 'coho log' command with --project, --space, --tail, --follow, and --context flags, then executes via executeCohoCommand and returns the result as text.
    case "logs": {
        const { tail = 100, follow, context } = args as LogArgs;
        const logArgs = [
            'log',
            '--project', config.projectId,
            '--space', config.space,
            '--tail', tail.toString()
        ];
    
        if (follow) logArgs.push('--follow');
        if (context) logArgs.push('--context', context);
    
        const result = await executeCohoCommand(logArgs);
        return {
            content: [
                {
                    type: "text",
                    text: result
                }
            ],
            isError: false
        };
    }
Behavior2/5

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

No annotations provided, so the description must carry the burden. It mentions 'show' implying a read operation but does not disclose whether follow keeps a stream open indefinitely, authentication requirements, or any side effects. Minimal behavioral detail beyond the schema.

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, front-loaded sentence with no wasted words. It captures the main action concisely, though omitting minor details like 'for a space' might be acceptable depending on context.

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?

Given the tool has 3 parameters and no output schema, the description should explain what the output contains, pagination, or how follow behaves. It lacks this, leaving the agent underinformed about the full behavior.

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%, so baseline is 3. The description adds generic context ('filtering and follow options') but does not provide meaningful semantic enrichment beyond what the schema descriptions already offer.

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 tool retrieves system logs for a space, with filtering and follow options. It is specific but does not differentiate from siblings; however, no sibling appears to offer log functionality.

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 on when to use this tool versus alternatives, nor any prerequisites or exclusions. The description simply states what it does without context for when it should be invoked.

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/RestDB/codehooks-mcp-server'

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