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.
| Parameter | Type | Default | Description |
|---|---|---|---|
project | string | LOGURO_PROJECT if set | Project slug (visible in app URL) |
level | string[] | — | Filter by level(s): error, warn, info, debug, etc. OR semantics. |
notLevel | string[] | — | Exclude log level(s) |
message | string[] | — | Substring match on message field. Multiple = OR. |
notMessage | string[] | — | Exclude logs matching these message substrings |
search | string | — | Global search across message + all context fields |
from | string | — | Start of date range (ISO 8601, e.g. 2026-05-01T00:00:00Z) |
to | string | — | End of date range (ISO 8601) |
notFrom | string | — | Exclude interval start (ISO). With notTo, carves a hole. Alone = keep logs strictly before. |
notTo | string | — | Exclude interval end (ISO). Alone = keep logs strictly after. |
slow | number | — | Shortcut: return only logs where context.duration > N ms |
trace | string[] | — | Filter by trace ID(s). Multiple = OR. |
notTrace | string[] | — | Exclude trace ID(s) |
context | object[] | — | Context field filters. See Context filters section below. |
investigatedOnly | boolean | — | Return only logs with a saved AI investigation |
memory | boolean | — | Query saved task-context parquets instead of normal logs |
perPage | number | 20 | Results per page (default 20, max 1000) |
cursor | string | — | Pagination cursor from previous response |
offset | number | — | Alternative 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
project | string | LOGURO_PROJECT if set | Project slug |
logId | string | — | The ULID of the log to center the timeline on |
window | number | 30 | Time 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: [...] }.
| Parameter | Type | Default | Description |
|---|---|---|---|
project | string | LOGURO_PROJECT if set | Project slug |
field | string | — | Field 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
project | string | LOGURO_PROJECT if set | Project slug |
groupBy | string | — | Field to group by: level, message, trace, or context column |
groupValues | string[] | — | Which group values to fetch (required by API) |
level | string[] | — | — |
from | string | — | — |
to | string | — | — |
search | string | — | — |
context | object[] | — | Context field filters. See Context filters section below. |
perPage | number | 20 | — |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
project | string | LOGURO_PROJECT if set | Project slug |
thresholdMs | number | 500 | Duration threshold in ms (default 500) |
perPage | number | 20 | — |
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
project | string | LOGURO_PROJECT if set | Project slug |
n | number | 10 | Sample size (max 100) |
level | string[] | — | — |
context | object[] | — | 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 }
] | Field | Type | Description |
|---|---|---|
key | string | Context field name, e.g. user_id, env, duration |
value | string | number | boolean | Value to compare against |
op | "=" | "!=" | ">" | "<" | ">=" | "<=" | Comparison operator (default =). Useful for numerics like duration. |
negate | boolean | If 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.