Can an AI agent find the cause of 5xx errors on an API without me running the queries?
Yes, Tares lets an agent find the cause of 5xx errors on an API without you running any queries. The agent calls one read tool and gets a correlated, time-ordered timeline across your sources, so it needs no per-system tools. You connect the agent once, then ask it what happened to the API.
How it works
Tares does the correlation, so the agent does not have to query each system and stitch the results together.
- Your metrics, logs and alerts are ingested into Tares as sources, and agents record findings there too.
- The
readtool returns a time-ordered timeline across all sources that match a label and value selector, matched with strict AND. Adding a project or a list of sources narrows it. - One read of your API’s entity returns the logs, metrics, alerts and findings in the same timeline, ordered by time. The agent sees an error spike next to the alert that fired and the log lines around it.
- The agent can also call
catalog_listandcatalog_describeto learn which sources, entities and sample events exist before it reads. - If the cause is still unclear, the agent can call
create_triggerto be woken when it happens again, andrememberto write back what it found. Arecord_findingcall saves a conclusion on an entity, with an optional headline and next step.
The agent holds one connection to Tares instead of one tool per monitoring system. For the wider picture of how Tares fits incident work, see AI SRE.
Set it up
- Get your MCP endpoint. On your own machine it is
http://localhost:8788/mcp. On your own server it ishttps://<your-domain>/mcp. On Tares Cloud it is shown in your console under Connect. - Running locally? Start Tares, then start the MCP server as a second process, because the daemon alone does not serve
/mcp:
tares uptares mcp --transport streamable-http --port 8788 --taresd http://localhost:8787- Connect your client. For Cursor, add this to
~/.cursor/mcp.json(or.cursor/mcp.jsonper project) and approve the server under Settings → MCP:
{
"mcpServers": {
"tares": {
"url": "http://localhost:8788/mcp"
}
}
}Claude Code, Codex, Claude Desktop and any MCP client that supports remote servers connect the same way. The console’s Connect page generates the exact command for your client with the endpoint and token filled in. The full list of clients and options is on the Connecting agents page.
4. On a secured instance, which includes every server and Tares Cloud instance, the client sends an Authorization: Bearer <api-key> header. Prefer a scoped API key with the read scope. On an open local instance you need no credential.
5. Verify. Ask your client: “Use tares: what are you ingesting right now?” It should call catalog_list and answer with your sources, triggers and projects.
6. Ask the real question: “Why is the API returning 5xx errors? What happened to it in the last 15 minutes?” The agent reads the timeline for your API and answers from it. In the console, Reads lists each read as it happens, tagged client = mcp.
What you get
- An answer from the agent without you opening a metrics dashboard, a log search or an alert list.
- One read that returns metrics, logs, alerts and findings for the API together, in time order, so the cause shows up next to its symptoms.
- A single connection for the agent, with no separate tool or credential for each monitoring system.
- Findings the agent records on the entity, so the next person or agent starts from what was already found.
- A trail in the console, where each read appears under Reads so you can see what the agent looked at.
- The option to give an agent that works on one project only a project key. It reads that project and records findings in it, and nothing else.
When something else fits
- If the data is not in Tares yet, the agent has nothing to correlate. Connect the sources that carry your API’s metrics, logs and alerts first.
- If you want a written finding without opening a chat, use an agent that runs inside Tares and wakes on a trigger. The in-app Ask chat is also available for exploring your data without wiring up an external client.
- If the agent should change your systems as well as diagnose them, it must be an external agent running in your own infrastructure that you connect, since it is the one that can act there.