/judgment:mcp-server-best-practicesfrom judgment
Best practices for using the Judgment MCP server effectively. Covers when to use MCP vs other tools, how to query traces with sql_query, and general usage patterns.
Ships in judgment. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Always use MCP tools first when the user asks about anything related to Judgment data — traces, labels, sessions, projects, automations, judges, prompts, datasets, tests, documentation, agent memory, agent threads, or organizations. Do not fall back to reading code or asking for IDs if an MCP tool can fetch the data directly.
Trace, span, session, and score reads go through sql_query, a read-only SQL SELECT scoped to one project. Call discover_schema first. It lists the tables (such as telemetry.traces and telemetry.spans), their columns, example queries, and row limits.
If discover_schema lists a text-search table, use it for content searches. Otherwise, match the root span's input and output on telemetry.traces with ILIKE, inside a narrow time window and with a LIMIT.
When answering a question that can't be answered with a single precise filter — e.g., "find traces where the user seemed confused", "show me failing traces from this week", "what are the most expensive traces?" — combine the conditions with OR in a single sql_query instead of making separate tool calls.
SELECT trace_id, trace_name, started_at, duration_ms, status, error_message
FROM telemetry.traces
WHERE started_at >= now() - INTERVAL 7 DAY
AND (status = 'error' OR duration_ms >= 10000)
ORDER BY started_at DESC
LIMIT 50
With no text-search table, one sql_query with keyword variants:
SELECT trace_id, trace_name, started_at
FROM telemetry.traces
WHERE started_at >= now() - INTERVAL 1 DAY
AND (input ILIKE '%billing%' OR output ILIKE '%billing%'
OR input ILIKE '%invoice%' OR output ILIKE '%invoice%'
OR input ILIKE '%payment%' OR output ILIKE '%payment%')
ORDER BY started_at DESC
LIMIT 50
discover_schema for content matching, or ILIKE on telemetry.traces input/output with a narrow time window and a LIMITOR in one sql_queryWHERE clausetrace_id before summarizingLIMIT large enough to find them. When presenting more than a handful of traces, use a tabular format (markdown table) for readabilitytelemetry.spans with trace_id IN (...) to read spans for several traces in one callsearch_memory_files to find relevant memory entries before calling read_memory_files with specific IDs/pathsget_test_run for a queued test run's status and get_test_run_items for per-example resultsWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub judgmentlabs/skills --plugin judgment3 skills in this plugin
/judgeval-jqlBuild, inspect, or execute tenant-safe Judgment Query Language (JQL) through the public Judgeval Python or TypeScript SDK. Use for querying project traces, spans, or sessions; aggregations and pipelines; chart or table presentations; discovery; public response handling; and JQL troubleshooting./judgmentUse Judgment for agent tracing, evaluations, Code judges, datasets, and monitoring. Use when integrating Judgment or judgeval, adding tracing to agents/workflows, creating evaluations or scorers, debugging traces, or looking up Judgment SDK usage and docs.