Skip to main content
Glama

Read recent function logs

get_function_logs
Read-only

Read recent runtime logs for a site's per-site Worker (console output, request summaries, exceptions) from Cloudflare Workers Observability — 7-day retention, newest first. Use this to debug a deployed function: each event has timestamp, level, message, outcome, statusCode, requestId, and CPU/wall time. Also returns a CF dashboard deep-link.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYessite slug whose function logs to read
limitNomax events to return (default 50)
sinceNolook back this many minutes (default 60, max 10080 = 7 days)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "max events to return (default 50)",
      +  "maximum": 1000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / since
      Added value: +{
      +  "description": "look back this many minutes (default 60, max 10080 = 7 days)",
      +  "maximum": 10080,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / slug / description
      Previous value: -"site slug whose function logs to link to"New value: +"site slug whose function logs to read"
  2. Changed2 schema fields changed
    • addedInput schema / properties / slug / description
      Added value: +"site slug whose function logs to link to"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "result": {}
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

The description discloses key behavioral traits: 7-day retention, newest-first ordering, and the exact fields returned (timestamp, level, message, outcome, statusCode, requestId, CPU/wall time). It also mentions a Cloudflare dashboard deep-link. These details add value beyond the readOnlyHint annotation.

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 compact two sentences, with no wasted words. The first sentence covers the main purpose and constraints, the second elaborates on return data. It is appropriately front-loaded.

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

Completeness5/5

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

Given the complexity (3 params, 1 required, output schema present), the description is complete. It explains what the tool does, when to use it, what the logs contain, and retention/ordering. No gaps remain for the agent.

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, so the baseline is 3. The description does not add parameter-specific meaning beyond the schema; it focuses on output details. While this is acceptable, there is no extra semantic enrichment for parameters like slug, limit, or since.

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 tool reads recent runtime logs for a site's per-site Worker, specifying the resource (function logs), action (read), and additional details (console output, request summaries, exceptions). It distinguishes itself from sibling tools like get_function or deploy_function by focusing on log retrieval.

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?

The description explicitly says 'Use this to debug a deployed function,' giving clear context. However, it does not provide negative guidance or mention when not to use this tool versus alternatives, though sibling tool names imply differentiation.

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