Opik
v3.0.13Read and score Opik traces, experiments, datasets and prompts from your AI assistant.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
read Read an Opik record
Read any Opik entity by ID, name, or opik:// URI. A UUID `id` costs one API call. A name also works for project, experiment, prompt, dataset and annotation_queue: two calls, and a name several records share returns them as candidates to retry by id. Special shapes: - project: returns {project, summary, vocabulary, contains, url} — the week's figures against the 7 days before (SDK traffic only, as the Logs cards show, though the UI opens on 30 days), the score names and usage keys to filter on, and the freshest experiment / dataset / prompt version / run. `since`/`until` move the su…
| Parameter | Type | Description |
|---|---|---|
entity_type * | string | One of: agent_insights_issue, annotation_queue, dataset, dataset_item, experiment, project, prompt, span, thread, trace. |
id * | string | UUID, entity name (for nameable types), full opik:// URI (e.g. opik://traces/<uuid>), or a pasted Opik link — a thread link or a Diagnostics page link (…/projects/<pid>/diagnostics?issue=<id>). Wh… |
fields | Return only these paths of the record, uncut: dotted into nested objects ('trace.output'), arrays whole ('spans'). The record's id is always kept; an unknown path is refused with the valid ones. The a… | |
project_id | Project UUID. Required for entity_type='thread' and 'agent_insights_issue' unless the id is a full Opik URL/URI (which carries the project). Ignored for globally-unique entities like trace/span. | |
project_name | Project name — alternative to project_id for project-scoped reads (thread, agent_insights_issue). | |
since | Start of the window, as a relative span ('7d', '24h') or an ISO-8601 instant with timezone. On read: project (the summary's period, 7d by default) and agent_insights_issue (per-day details, truncated… | |
until | End of the window, same forms as since. |
list List Opik records
List Opik entities with optional filters and pagination. Output is a pipe-delimited table with id, name, and a few entity-specific columns, plus a pagination footer when more pages exist. When filters apply, the first line echoes what was applied. Use read() to get full details on any specific item. Project-scoped types require their parent: - trace: project_id or project_name - span: project_id or project_name (searches spans across the project) - thread: project_id or project_name - agent_insights_issue: project_id or project_name (Diagnostics issues, open ones by default; columns: sever…
| Parameter | Type | Description |
|---|---|---|
entity_type * | string | One of: agent_insights_issue, annotation_queue, dataset, dataset_item, experiment, online_rule, project, project_metric, prompt, prompt_version, score_name, span, thread, trace. |
breakdown | project_metric only: group each bucket by this field, or 'metadata.<key>'. Not valid for every metric — schema('list.project_metric') says which. | |
dataset_id | Required when listing dataset_items, unless experiment_ids is given. UUID of the dataset. | |
experiment_ids | dataset_item: compare these experiments case by case — which cases regressed, not two averages. First id is the baseline; up to 10. Resolves the dataset itself; sort and search apply to the runs, an… | |
fields | Return only these columns, uncut: any name from the page's 'fields:' line ('data.question', 'feedback_scores.helpfulness', 'usage.total_tokens'). Each row keeps the id that opens the next level. An un… | |
filters | OQL filter for trace, span, thread, experiment, dataset_item, project_metric: <field>[.<key>] <op> <value> [AND ...]; ops = != > >= < <= contains not_contains starts_with ends_with is_empty is_not_emp… | |
interval | project_metric only: bucket width. Omitted, it follows the window the way the Metrics tab does: hourly up to 3 days, daily up to 30, weekly beyond. | |
metric_type | project_metric only: which metric to chart. Reference: schema('list.project_metric'). | |
name | Optional substring filter on entity name. Supported for project, experiment, prompt, dataset; ignored for sub-collections. | |
page | integer | Page number (1-indexed). |
project_id | Parent project UUID for project-scoped lists (trace, span, thread, agent_insights_issue). Pass this OR project_name. | |
project_name | Parent project name — alternative to project_id for project-scoped lists; no UUID lookup needed. | |
prompt_id | Required when listing prompt_versions. UUID of the prompt. | |
search | Free text for trace, span, thread: matches anywhere in id, name, input, output, metadata, tags, thread_id (spans: model, provider too). Expensive on large projects; narrow with since first. | |
series | project_metric only, with breakdown: which series to group — a percentile (p50/p90/p99), a score name, or a usage key. | |
since | Start of the time window for trace, span, thread, project_metric, agent_insights_issue: a relative span ('30m', '1h', '24h', '7d') or an ISO-8601 instant with timezone. Trace/span/thread windows are b… | |
size | integer | Items per page. Capped at 100. |
sort | Sort for trace, span, thread, experiment: '<field> [asc|desc]', desc by default. E.g. 'duration desc', 'total_estimated_cost', 'feedback_scores.accuracy asc', 'usage.total_tokens'. One field only. | |
status | agent_insights_issue only: which Diagnostics issues to list. Defaults to 'open' (what is broken now); 'resolved' and 'closed' show issues already dealt with. Ignored for other entity types. | |
until | End of the time window, same forms as since. |
write Write to Opik
Create, update, or annotate Opik entities. The `operation` field selects which entity/verb pair to invoke; `data` carries the payload for that operation (single object, or array up to 1000 for batch). Operations: - trace.create: Log a single trace (or a batch). Sets up the parent for spans/scores/comments. (batch ok) - trace.update: Finalize or amend an existing trace by id. (batch ok) - span.create: Log a single span on an existing trace (or a batch).; required: trace_id (batch ok) - score.create: Attach a numeric feedback score to a trace, span, or thread.; required: target, target_id (batc…
| Parameter | Type | Description |
|---|---|---|
data * | Payload for the operation. Object for a single write, or array (max 1000 elements) for batch. Always-envelope operations (dataset_item.upsert, experiment_item.create) take their list inside the envelo… | |
operation * | string | The entity/verb pair to invoke. See tool description for the list. Call schema(operation) for the JSON Schema, example, and required scope. |
dry_run | boolean | Validate against the operation's schema and OAuth scope without calling the backend. Returns {dry_run: true, would_call: ...}. |
idempotency_key | Optional client-supplied UUID. Re-running with the same key is a no-op on the backend. Takes precedence over data.id when both are set. |
schema Show a write operation's input
Return the JSON Schema, OAuth scope, and one validated example for a write operation's `data` payload, or — for `list.trace` / `list.span` / `list.thread` / `list.experiment` — the list tool's filterable fields with their operators and its sortable fields. Pure lookup — no backend call.
| Parameter | Type | Description |
|---|---|---|
operation * | string | Write operation whose schema to return, or list.<entity> (list.trace, list.span, list.thread, list.experiment) for the filter and sort reference of the list tool. |
read_skill Read an Opik agent skill
Load one Opik agent skill — the same skills Opik publishes for coding agents. Use it when the skill you need is not already in your context. WHEN TO CALL: before instrumenting, evaluating, or debugging with Opik — no local copy in the project, nothing fetched earlier this session. Match the user's task to a skill: - opik: "why aren't my traces showing up", "how do I add metadata to a span", "how do I version a prompt" — any SDK lookup. To instrument, use opik-instrument. - opik-annotate: "build a custom annotator view", "set up an annotation queue". - opik-compare: "did my fix work", "…
| Parameter | Type | Description |
|---|---|---|
skill_name * | string | A skill name ('opik-instrument'), a path inside a skill ('opik/references/tracing-python.md'), or a resource URI ('opik://skills/opik/SKILL.md'). A SKILL.md ends with the list of its references. |
send_feedback Send feedback to the Opik team
Send feedback about this MCP server (opik-mcp) to the Opik team at Comet. It is not for the user's Opik data. Call it when an opik-mcp tool failed, gave a wrong or confusing result, or cannot do what the user needs, or when the user asks to send feedback. Do not call it when the task went well, to report progress, or as a test. Send at most one report per task. Describe the problem in general terms: no trace content, names, IDs or secrets from the user's data. The report carries the workspace name and the user's Comet login.
| Parameter | Type | Description |
|---|---|---|
category * | string | What went wrong. |
description * | string | 2-4 sentences: what you tried, what came back, what you expected. No user data. |
impact * | string | blocked: the task could not be done. workaround: it was done another way. minor: it cost time only. |
requested_by_user | boolean | True when the user asked to send this. |
target | string | The entity type or write operation, e.g. trace. |
tool | string | The opik-mcp tool it concerns. |