# BSimple MCP — instructions for AI agents

Stable URL for this file: `https://bsimple.com.au/agents/bsimple-mcp.md`
Last updated: 2026-11-26 (MCP v0.5.0). Human-facing documentation:
`https://bsimple.com.au/api/mcp/`.

## Copyable agent instruction block

```text
BSimple MCP rules:
- BSimple exposes exactly two MCP tools: search and execute.
- Use search to discover capabilities when you do not know the capability id
  or its argument schema. Search a business phrase ("stock running low",
  "who owes money", "find customer by email"), an exact capability id, or a
  category name. An empty query lists categories.
- Search results describe operations only; they never retrieve business
  records. Each result carries the capability id, description, complete
  input schema, read/write access, required scope, idempotency flag,
  destructive flag and external side effects.
- Use execute to retrieve records or perform the operation:
  execute { "tool": "<capability id>", "arguments": { ...matching schema... } }
- Reuse capability ids and schemas you have already discovered; repeat
  search only when you need something new.
- Never invent capability ids, argument names or business record IDs. If an
  id fails with unknown_capability, search for the right one.
- Respect operation-specific permissions, side effects and confirmation
  requirements: capabilities marked with side effects (sending emails or
  SMS) reach real people; destructive capabilities return
  confirmation_required with a token and perform nothing until you repeat
  the identical execute call with confirm=<token>.
- Retrieve only the records and information necessary to complete the task.
  Use pagination (page, per_page, max 100) and filters instead of
  requesting excessive datasets.
- Do not retry destructive or write operations blindly. Write capabilities
  with idempotency_key support are safe to retry (the server sends a key
  automatically when omitted); check the structured error first.
- Errors are structured: unknown_capability, invalid_arguments (with
  per-field issues), insufficient_scope, confirmation_invalid,
  write_limit_reached, request_failed. Handle them and ask the user for
  clarification when the request itself is ambiguous.
- After 5 successful writes in 10 minutes the server pauses writes
  (write_limit_reached): stop, summarise what you changed, ask the human,
  take a backup with backups_create if changes are continuing, then call
  writes_confirm with human_confirmed=true only after the human agrees.
- Do not assume every account has access to every capability: search only
  offers what the connected key or OAuth grant permits.
```

## Tool reference

`search` input: `{ "query": string (max 200 chars), "limit": 1-20 (default 5) }`.
Read-only; annotated `readOnlyHint`. Exact capability ids take priority over
phrase matches; category queries list a category; no-match responses include
suggestions and the category index.

`execute` input: `{ "tool": string, "arguments": object, "confirm": string? }`.
Handles both reads and writes: annotated as able to write and capable of
destructive operations, never as read-only or universally idempotent. Every
call independently validates the capability, the arguments and the
connection's scopes.

Capability families include: customers, leads, contracts, invoicing,
debtors, inventory, suppliers, locations, reorder/PAR, stocktakes,
purchasing, transfers, saleable bundles, backups, voice receptionist and
(administrative keys only) demo setup and WooCommerce integration tools.
Capability identifiers are stable; new capabilities appear through search
without any change to the two public tool definitions.
