Gemini Code Assist Integration¶
Pisama connects to Gemini Code Assist via the Pisama MCP server. Gemini Code Assist speaks MCP over stdio — no extra transport or auth surface needed.
Overview¶
From inside Gemini Code Assist you can:
- Query traces — find agent runs by framework, status, or date range.
- Inspect detections — see which failure modes fired and with what confidence.
- Get fix suggestions — per-detection remediation options with risk ratings.
- Submit feedback — correct false positives to improve detector recall.
- Create and run scorers — natural-language quality metrics against your traces.
The Pisama MCP server calls the Pisama backend API (api.pisama.ai) on each tool invocation. An API key and tenant ID are required — get them from pisama.ai/settings/api-keys.
Prerequisites¶
- Python 3.11+ accessible from your editor's terminal
- API key + tenant ID
- Pisama backend package installed (see below)
Installation¶
Configure Gemini Code Assist¶
In VS Code or JetBrains with Gemini Code Assist installed, open the MCP servers panel and add:
{
"mcpServers": {
"pisama": {
"command": "python",
"args": [
"-m", "app.mcp.server",
"--base-url", "https://api.pisama.ai",
"--api-key", "pisama_YOUR_KEY",
"--tenant-id", "YOUR_TENANT_UUID"
],
"cwd": "/path/to/pisama/backend"
}
}
}
Reload Gemini Code Assist. Confirm the server is connected by asking:
show me recent pisama detections
You should see a paginated list of detections with types and confidence scores.
Available Tools¶
| Tool | Purpose |
|---|---|
pisama_query_traces | Search traces by framework, status, or date |
pisama_get_trace_detail | Full trace detail including all agent states and timeline |
pisama_query_detections | Search detections by type, confidence, or trace |
pisama_get_detection_detail | Detection detail with explanation and evidence |
pisama_get_fix_suggestions | Remediation options for a detection |
pisama_apply_fix | Apply a suggested fix |
pisama_submit_feedback | Mark a detection as correct or false positive |
pisama_create_scorer | Create a custom quality scorer from a description |
pisama_list_scorers | List scorers for this tenant |
pisama_run_scorer | Run a scorer against recent traces |
pisama_evaluate_conversation | Full conversation quality analysis for a trace |
pisama_generate_source_fix | Generate a source code patch for a detection |
See the MCP Server guide for full argument reference and troubleshooting.
Example prompts¶
- Find failures: "show me pisama detections from the last hour"
- Investigate: "get the full detail for detection
abc123" - Remediate: "what fixes are available for detection
abc123?" - Analyze quality: "run the pisama conversation evaluator on trace
xyz789" - Custom metric: "create a pisama scorer for tool-use efficiency — penalize redundant tool calls"
Tier behavior¶
pisama_query_detections returns detections at or above min_confidence (default: no filter). Set min_confidence: 70 to restrict to high-confidence detections matching the production F1 gates in the calibration report.