Tools reference

The MCP server exposes 6 tools. Each is a single round-trip to the Loguro logs API — no SQL, no streaming, no internal chaining. Claude composes multi-step investigations by calling them in sequence.

When LOGURO_PROJECT is set, the project parameter becomes optional and defaults to that slug.

query_logs

Query logs from a Loguro project with filters. Use this to search for errors, slow requests, or any log entries.

ParameterTypeDefaultDescription
projectstringLOGURO_PROJECT if setProject slug (visible in app URL)
levelstring[]Filter by level(s): error, warn, info, debug, etc. OR semantics.
notLevelstring[]Exclude log level(s)
messagestring[]Substring match on message field. Multiple = OR.
notMessagestring[]Exclude logs matching these message substrings
searchstringGlobal search across message + all context fields
fromstringStart of date range (ISO 8601, e.g. 2026-05-01T00:00:00Z)
tostringEnd of date range (ISO 8601)
notFromstringExclude interval start (ISO). With notTo, carves a hole. Alone = keep logs strictly before.
notTostringExclude interval end (ISO). Alone = keep logs strictly after.
slownumberShortcut: return only logs where context.duration > N ms
tracestring[]Filter by trace ID(s). Multiple = OR.
notTracestring[]Exclude trace ID(s)
contextobject[]Context field filters. See Context filters section below.
investigatedOnlybooleanReturn only logs with a saved AI investigation
memorybooleanQuery saved task-context parquets instead of normal logs
perPagenumber20Results per page (default 20, max 1000)
cursorstringPagination cursor from previous response
offsetnumberAlternative to cursor: numeric offset
order"asc" | "desc""desc"Sort order by timestamp

Example. User asks: “Show me errors from the payments service in the last hour where the user was on staging.”

{
  "level": ["error"],
  "from": "2026-05-09T11:00:00Z",
  "context": [
    { "key": "service", "value": "payments" },
    { "key": "env", "value": "staging" }
  ]
}

get_log_timeline

Get logs surrounding a specific log ID within a time window. Useful for understanding context around an error.

ParameterTypeDefaultDescription
projectstringLOGURO_PROJECT if setProject slug
logIdstringThe ULID of the log to center the timeline on
windownumber30Time window in seconds around the log (default 30)

Example. User: “What was happening around log 01HX9Q...?”

{ "logId": "01HX9Q...", "window": 60 }

get_distinct_values

Get all unique values for a field under current filters. Returns { values: [...] }.

ParameterTypeDefaultDescription
projectstringLOGURO_PROJECT if setProject slug
fieldstringField name: level, message, trace, or a context column (raw column name as stored)

Example. User: “What environments do we ship logs from?”

{ "field": "context.env" }

group_logs

Group logs by a field. Returns { grouped: { <value>: [logs] } } for each requested groupValue.

ParameterTypeDefaultDescription
projectstringLOGURO_PROJECT if setProject slug
groupBystringField to group by: level, message, trace, or context column
groupValuesstring[]Which group values to fetch (required by API)
levelstring[]
fromstring
tostring
searchstring
contextobject[]Context field filters. See Context filters section below.
perPagenumber20

groupValues is required — the API does not auto-discover groups. Use get_distinct_values first if you don’t know the values.

Example. User: “Bucket the last hour’s logs by level for error and warning.”

{
  "groupBy": "level",
  "groupValues": ["error", "warning"],
  "from": "2026-05-09T11:00:00Z"
}

get_slow_logs

Shortcut to find slow requests above a duration threshold.

ParameterTypeDefaultDescription
projectstringLOGURO_PROJECT if setProject slug
thresholdMsnumber500Duration threshold in ms (default 500)
perPagenumber20

Example. User: “Anything slower than 2 seconds today?”

{ "thresholdMs": 2000 }

sample_logs

Get a random sample of logs, optionally filtered. Good for getting a feel for what’s in a project.

ParameterTypeDefaultDescription
projectstringLOGURO_PROJECT if setProject slug
nnumber10Sample size (max 100)
levelstring[]
contextobject[]Context field filters. See Context filters section below.

Example. User: “Show me 20 random debug logs to see what’s flowing through.”

{ "n": 20, "level": ["debug"] }

Context filters

Several tools (query_logs, group_logs, sample_logs) accept a context parameter — an array of filter objects that target arbitrary context.<key> columns.

[
  { "key": "user_id", "value": "42" },
  { "key": "duration", "value": 500, "op": ">=" },
  { "key": "env", "value": "staging", "negate": true }
]
FieldTypeDescription
keystringContext field name, e.g. user_id, env, duration
valuestring | number | booleanValue to compare against
op"=" | "!=" | ">" | "<" | ">=" | "<="Comparison operator (default =). Useful for numerics like duration.
negatebooleanIf true, exclude matches (maps to notContext_<key>)

The default operator is =. negate: true flips the filter to an exclusion (under the hood it maps to notContext_<key>). When both op and negate are set, the negation takes precedence and the operator is dropped.

// related

See also