Skip to Content
Tares

How do I ask Claude Code to investigate a cron job that stopped with Tares?

Tares lets Claude Code investigate a stopped cron job once you connect it over MCP and ask what happened to that service in the last 15 minutes. Claude Code calls the read tool and answers from one correlated, time-ordered timeline of logs, metrics, alerts and findings. You get the evidence around the stop in a single read, without opening each system by hand. This is the pull side of the AI SRE setup: you ask when you want to know.

How it works

  • Every source that carries the same label, such as service, merges into one timeline for that entity. The cron job’s logs, metrics and alerts sit on one clock when they share a label value.
  • Claude Code discovers the Tares tools when it connects. For your question it calls read with a selector like {"service": "api-server"}, where the label and value match your cron job’s source labels. The selector is a strict AND across labels, and project or sources narrows the read.
  • The read also returns findings recorded earlier on that entity. A second investigation starts from the previous conclusion instead of from scratch.
  • catalog_list and catalog_describe let Claude Code learn which sources, entities and sample events exist before it reads.
  • On a secured instance the MCP surface needs a credential. Use a scoped API key with the read scope. To limit an agent to one project, use a project key.
  • In the console, Reads lists each read as it happens, tagged client = mcp, so you can see what Claude Code looked at.

Set it up

  1. Start Tares locally, then start the MCP endpoint in a second terminal. On a server deployment or Tares Cloud the MCP server already runs. The endpoint is https://<your-domain>/mcp on your own server, and on Tares Cloud the console’s Connect page shows it.

    tares up tares mcp
  2. Connect Claude Code. The Tares plugin is the default path. It wires the MCP read-back and session capture in one install, and prompts for the MCP endpoint (default http://127.0.0.1:8788/mcp).

    /plugin marketplace add glassflow/tares /plugin install tares@tares

    To connect without capturing sessions, add the server from your terminal instead:

    claude mcp add --transport http tares http://localhost:8788/mcp

    For a remote, secured instance, pass a read-scoped API key as an Authorization Bearer header on that command, as the console’s Connect page shows.

  3. Verify the connection. Ask Claude Code:

    Use tares: what are you ingesting right now?

    It should call catalog_list and list your sources, triggers and projects.

  4. Make sure the cron job reaches Tares. Its logs, metrics or run events need to arrive as a source whose label, for example service, carries the job’s name. The AI SRE guide shows how to key sources by one label, and a webhook source lets the job post its own run events.

  5. Ask the question, using the name your source labels carry:

    Use tares: what happened to nightly-backup in the last 15 minutes?

    Claude Code calls read for that service and answers from the correlated timeline. Follow up with questions such as what changed just before the last run, or which alerts fired on the same entity.

Other clients connect the same way. See Connecting agents (MCP) for Codex, Cursor, Claude Desktop and any MCP client.

What you get

  • One answer built from the logs, metrics, alerts and findings recorded for the cron job’s service, in time order, instead of a tour through separate tools.
  • Claude Code reads the evidence you already ingest. Nothing new needs installing on the job’s host beyond the source that carries its signals.
  • A trail you can audit. Each read shows in Reads in the console as an MCP read.
  • Earlier findings on the same entity come back with the read, so repeat investigations build on each other.
  • The same endpoint serves other agents. Codex, Cursor and your own MCP clients read the same timeline.

When something else fits

  • If you want to be told when the job fails instead of asking, add a trigger and a Tares agent that writes a finding. That is the push half of the AI SRE guide.
  • If you would rather not wire up an external client, the console’s Ask chat uses the same read tools inside Tares.
  • If the job’s output never reaches Tares as a source, Claude Code has nothing to read for it. Add a source first, then ask.

Still stuck? Get help

Last updated on