Skip to main content
Glama

project_logs

Tail function logs, read recent runtime output, debug a just-deployed endpoint, see what console.log printed, observability. After every project_deploy / project_patch, it shows what the new code logged on the first few requests — no need to curl the endpoint and guess. Also writes logs (with a message).

Read mode (no message): returns the most recent log lines for the project, newest first. Filter by level, source (server | client | function | job | cron | queue | system | oauth), substring match, or trace ID. Default limit 50, max 500.

Write mode (with message): records a structured log line. Used by your own monitoring code, or by an agent that wants to mark a checkpoint. Writes are durable but ingested asynchronously — a line you just wrote may take a few seconds to appear in a read. queued:true confirms acceptance, not immediate readability.

Example:

// Read recent logs after a deploy:
{ "project_id": "my-saas", "limit": 50 }

// Read only errors:
{ "project_id": "my-saas", "level": "error", "limit": 50 }

// Read logs from one source:
{ "project_id": "my-saas", "source": "server", "search": "/api/checkout" }

// Write (with structured data):
{ "project_id": "my-saas", "message": "Payment processed", "level": "info", "data": "{\"amount\":49.99}" }

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_id": "<project_id>"
    },
    "name": "project_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataNoOptional JSON string of structured data (write mode)
levelNodebug | info | warn | error (default info)
limitNoMax rows (default 50, max 500, read mode)
searchNoSubstring match on message (read mode)
sourceNoFilter to one source: server | client | function | runtime_console | job | cron | queue | system | oauth (read mode; runtime_console contains production console output)
messageNoLog message. Omitted: logs are read instead of written.
trace_idNoOptional 32-character trace id. Returns only log lines from that distributed request.
project_idYesProject ID (UUID), subdomain, or slug — resolved server-side, no UUID lookup needed. 'default' also works when the account has exactly one project; multi-project accounts must name one (the error lists them).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false); the description adds genuinely new behavior such as newest-first ordering, default 50/max 500 limits, and durable-but-asynchronous ingestion where `queued:true` means accepted rather than readable. That async caveat is exactly the kind of non-obvious trait that prevents an agent from wrongly concluding a write failed, though write-side authorization requirements are still unstated.

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?

It is front-loaded with the primary use case, uses bolded mode headers, and each sentence carries information such as ordering, limits, or async semantics. The four examples are slightly redundant (the first three differ only by filter), but they are fenced and skimmable rather than buried in prose.

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

Completeness4/5

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

With 8 params, no output schema, and a mutation path, the description covers mode selection, limits, ordering, and write acknowledgement, which is enough to call it correctly. It stops short of describing the shape of returned log entries or how to page past the 'recent' window, both of which an agent doing deeper log analysis would want.

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?

Schema coverage is 100%, so the baseline is 3, but the description goes further by explaining mode-conditional parameter relevance (filters and `limit` apply to read; `message`/`data` to write) and by showing four worked request examples that demonstrate how `level`, `source`, and `search` combine. The source list in the description omits the schema's `runtime_console` value, a small divergence that could mislead an agent looking for production console output.

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 states a concrete verb and resource (tail/read and write log lines for a project) and immediately grounds it in a workflow: seeing what newly deployed code logged after project_deploy/project_patch. It also cleanly splits the dual behavior into 'Read mode (no message)' and 'Write mode (with message)', so an agent knows which face of the tool it is calling.

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

Usage Guidelines4/5

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

It gives clear triggering contexts — debugging a just-deployed endpoint, inspecting console.log output, marking an agent checkpoint — and explains the mode switch condition (presence of `message`). What it lacks is explicit routing away from siblings: it never says when to prefer `errors` or `project_deploy_log` over this tool, so the agent must infer alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources