MCP tools
Use AgentStack MCP tools safely with asynchronous source indexing and organization context.
The MCP server provides read tools for agents, sources, conversations, contacts, teams, analytics, and organizations. It also provides write tools for creation, restoration, updates, tests, deletion, and organization switching.
Read access is intentionally narrower than write access. Treat tools that delete, update, or test an agent as actions with consequences. The client can invoke them in a single step. A test creates an mcp_test conversation and spends model credits. improve_answer is also flagged destructive: it upserts a QnA source by originating message, so a second call for the same message replaces the pair that the first call wrote.
The server also provides ticket tools for the Help Desk inbox: list and inspect tickets and their message threads, assign a ticket, change its status, add an internal note, and close it. reply_to_ticket sends a real, customer-facing message and is gated on the separate mcp:send scope described in MCP scopes — holding mcp:write alone does not authorize it.
Organization-administration tools cover API keys and membership: list_api_keys and revoke_api_key, and list_members and list_invitations. These require the mcp:admin scope. Billing data (subscription, usage, credit history, and plan limits) is reachable through the catalog under the mcp:billing scope rather than as dedicated tools. See MCP scopes for how a client requests each of these narrower scopes.
Dedicated tools cover the most common work, but they do not cover every REST API v1 operation. Five catalog tools reach the remainder by operation id. search_api_actions runs a full-text search over every operation and returns up to ten ids with their summaries. get_api_action_details returns the input and output JSON Schema for one id. execute_read_action, execute_write_action, and execute_delete_action then call that operation with the arguments the schema describes. Each executor accepts only operations of its own effect and rejects the others, so a destructive call always reaches the tool that a client prompts to confirm.
Call search_api_actions first, then get_api_action_details, and only then an executor. The executors take arbitrary arguments, and the schema is how a client learns their shape. The catalog does not widen access. An operation that your role cannot reach is absent from search results and from the details tool, and the executors re-check permission and scope against the target operation. An operation that your plan or role does not currently allow is listed with available: false and a reason, rather than hidden. The executors themselves carry no fixed scope, so a narrowly scoped token still reaches exactly the operations that its own scope covers.
MCP sources support url and text. URL indexing is asynchronous. When you create a source, the response shows its indexing state and next action. You can then poll get_source until the source is ready. You can restore a soft-deleted agent or source only within the 30-day window.
Optional include fields expose extra detail for an agent, a source, or a conversation. If a workflow needs that detail, request the include fields.
The server resolves the active organization in this order:
- The MCP organization that you pin manually.
- The active dashboard organization.
- The oldest membership.
switch_organization persists the selection.
Tool responses echo the organization identity. Before you apply a mutation, check this identity for an unexpected context.