# An agent's first five calls over MCP

> A sensible order for an agent's first session against a netweft workspace over POST /mcp: who it is, what is there, what moved, and what more would cost.

Source: https://netweft.com/blog/an-agents-first-calls
Updated: 2026-10-08

**Start with whoami for the workspace and plan, list_projects to find the domain, get_project_overview for counts and the latest audit, then get_rank_trend or get_keyword_rank_history for what moved. Read get_credit_balance before suggesting paid work. Every call reads stored rows and spends nothing.**

An agent pointed at netweft's [MCP server](/mcp) has a few dozen tools and no
context. The order it calls them in decides whether its first answer is about
the right project. This is the order we would use.

The connection itself is `POST /mcp` with an API key, sent as a bearer token in
`Authorization` or in an `x-api-key` header. A key belongs to one workspace and
can be [scoped](/blog/what-a-scoped-key-protects) to part of it.

## 1. whoami

"What this API key can see": the workspace, whether it is entitled to paid
work, its plan, and how many active projects it holds. It takes no arguments
and it is the right first call when the agent knows nothing.

If it reports no entitlement, the agent should say so rather than plan work
the workspace cannot do. Reads of stored data still work; anything that would
buy fresh data would be refused.

## 2. list_projects

The projects, each with its id, name and domain. Archived projects are left out
unless the agent asks for them. Matching the domain the person named to a
project id here prevents the most common mistake, which is answering about the
wrong site.

## 3. get_project_overview

A summary of one project: saved and tracked keyword counts, the latest audit,
the latest backlink snapshot, and the average rank position. It is enough to
know which of the next tools are worth calling.

## 4. What moved

Rank tracking is organised by configuration: one domain in one market.
`list_rank_trackers` lists them, with how often each runs and why the last
scheduled run was skipped, if it was. Then:

- `get_rank_trend` shows how many keywords sat in the top 3, 4 to 10 and 11 to
  20 at each check, over the last 30 days unless asked for longer.
- `get_keyword_rank_history` is one keyword's stored observations, which is
  what to quote when somebody asks "when did this drop".
- `list_audit_issues` is the same for the site audit, with severities.

Every figure these return was observed and stored when the check ran. An
agent quoting them is quoting the record, not a fresh estimate.

## 5. What more would cost

Agents like to suggest work. Two tools keep the suggestion honest:

- `get_credit_balance`: what is available, what is held by calls in flight,
  and what each pool holds.
- `estimate_rank_check_cost`: what running a configuration's check now would
  cost, keywords times devices. Nothing is bought.

An agent that reads both before it says "let's re-check everything daily" can
say what that costs in the same breath.

## What the agent cannot do

Spend. Every MCP tool reads rows netweft already stored, so none of them buys
a lookup, starts a crawl or uses a credit. That is why
[reading a workspace from an agent](/blog/reading-a-workspace-from-an-agent)
costs nothing: the credits were spent when the observation was made. A key is
held to 120 requests a minute, which is room for a long session and not for a
loop that never stops.
