> ## Documentation Index
> Fetch the complete documentation index at: https://docs.switchagents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs moved from docs.flintai.dev to docs.switchagents.ai. Use docs.switchagents.ai for every link and request.
> To search these docs from an AI tool, connect the MCP server at https://docs.switchagents.ai/mcp. The page index is at https://docs.switchagents.ai/llms.txt.

# MCP tools

> Each tool the Switch Trust MCP server offers and what it returns

Use this page to see what each Switch Trust MCP server tool can read. The tools are read-only. Some return one type of data, while others combine related information to give your coding agent a more useful result. To call Switch Trust from your own code instead, see the [API reference](/switch-trust/api-reference/index).

## What your coding agent can read

* **Sessions and interactions,** including cost, tokens, turns, duration, latency, and input previews.
* **Issues and remediation,** including rules, severity, affected files, code snippets, evidence, and remediation guidance.
* **Inventory,** including agents, models, tools, and MCP servers, along with related issues and code locations.
* **Guardrails,** including policies and counts of traffic by guardrail outcome, such as blocked or redacted.
* **Evaluations,** including definitions, evaluation health, score trends, and results from individual runs.
* **Optimizations,** including the confidence level for each and, for most, the estimated savings.

## Workspace

| Tool | What it returns |
| - | - |
| `get_context` | The Switch Trust instance, tenant, and workspace the server is using. The server discovers these IDs from your API key. |

## Sessions and interactions

| Tool | What it returns |
| - | - |
| `list_llm_sessions` | Sessions for one agent, with cost, tokens, turns, and duration. You can sort by `cost`, `tokens`, `turns`, `duration_ms`, or `time`. Sorting is ascending unless `sort_dir` is `desc`. |
| `get_llm_session` | The totals and every turn for one session, including input, output, and cached tokens, cost, latency, and an input preview. |
| `list_llm_interactions` | Prompt and response pairs with guardrail outcomes, for all agents or a specified agent. Long text is shortened. |
| `get_interaction` | One interaction in full, including its guardrail events. |

Costs are estimates, based on each model's published price or the rate your organization has set for it. A model with no price shows a cost of \$0.

Session and interaction data includes prompts, responses, and input previews, which can contain secrets or customer data. Don't copy them into pull requests or tickets.

## Guardrails

| Tool | What it returns |
| - | - |
| `list_guardrail_policies` | Guardrail policies in your workspace. |
| `get_guardrail_policy` | One policy and its detector configuration. |
| `get_guardrail_interaction_counts` | Interaction counts by guardrail outcome over time. |
| `get_guardrail_outcomes` | Total interactions by guardrail outcome. |
| `get_guardrail_categories` | Counts of blocked or redacted interactions by guardrail category. |

The guardrail count, outcome, and category tools can scope their results to one agent with an agent ID.

## Evaluations

| Tool | What it returns |
| - | - |
| `list_evaluations` | Evaluation definitions, including adversarial probes and metrics. |
| `get_evaluation` | One evaluation definition, including, for adversarial probes, its attack techniques and adversarial goals. |
| `list_agent_evaluations` | Evaluations assigned to agents, with the latest run status and recent scores. |
| `get_agent_evaluation` | One agent-evaluation assignment in full. |
| `get_agent_evaluation_summary` | The evaluation health score, OWASP category coverage, and score trend for one agent. |
| `list_evaluation_runs` | Evaluation runs and their status. |
| `get_evaluation_run` | One evaluation run in full. |
| `list_evaluation_run_results` | The result for each test in one run. Conversation text is shortened. |
| `get_agent_endpoint` | The endpoint used to run evaluations for an agent. Credentials are always redacted. |

## Issues and remediation

| Tool | What it returns |
| - | - |
| `list_issues` | Issues grouped by rule and severity. |
| `get_issue` | One issue, its rule-level remediation guidance, and a page of affected objects. |
| `get_finding_detail` | The file path, code snippet, evidence, and remediation for one finding. |
| `find_issues_for_file` | Issues with findings in a specified file. The server checks issues and findings for matching file paths. |
| `get_remediation_guidance` | Remediation guidance for a rule, served by your Switch Trust instance, with instructions for choosing and applying a fix. |

If `find_issues_for_file` returns `complete: false`, it stopped before checking every issue. Treat the result as unknown rather than clean. It checks up to 50 issues by default, and up to 500 if you ask for more.

## Inventory

| Tool | What it returns |
| - | - |
| `list_agents` | Agents in your workspace. |
| `get_agent` | One agent with its issues, MCP servers, and code locations. |
| `list_models` | Models in your workspace. |
| `get_model` | One model with its issues and code locations. |
| `list_tools` | Tools in your workspace. |
| `get_tool` | One tool with its agents, issues, and code locations. |
| `list_mcp_servers` | MCP servers in your workspace. |
| `get_mcp_server` | One MCP server with its issues, code locations, and the agents that use it. |

## Cost optimization

These tools read the [optimizations](/switch-trust/mcp/playbooks#optimizations) from Switch ROI, the Switch Trust capability that shows what each agent costs and recommends how to make it cheaper. That's where the `roi` in their names comes from.

| Tool | What it returns |
| - | - |
| `list_roi_agents` | Agents with recent model traffic, including interaction count and latest interaction time. |
| `list_roi_interactions` | Interactions for one agent, including model, tokens, tool definitions, tool calls, and cost. |
| `list_roi_analyses` | Optimization results, including ones still running or that failed, with their confidence levels and estimated savings. |
| `get_latest_roi_analyses` | The latest finished result for each analysis type for one agent. |
| `get_roi_analysis` | One cost-optimization analysis in full. |

## Not available through the MCP server

The Switch Trust API also provides cost data that the MCP server doesn't expose, including cost summaries, spend caps, burn rate, and model pricing. Read that information in Switch Trust or call the API directly.

## Next steps

<CardGroup cols={2}>
  <Card title="Optimize agents" icon="gauge-high" href="/switch-trust/mcp/index">
    Put these tools to work on an expensive agent, end to end
  </Card>

  <Card title="Connect your coding agent" icon="plug" href="/switch-trust/mcp/connect">
    Set up the server in Claude Code, Cursor, or VS Code
  </Card>
</CardGroup>
