Sessions
The unit of scope — tools, accounts, knowledge, and the MCP surface.
A session is the working context for one tenant/user: which tools and toolkits are visible, which connected accounts can be used, which knowledge packs are enabled, and the MCP surface the agent gets.
The session is the unit of scope
You don't pass toolkit lists on every call. You configure them once when you create the session:
const session = await stacklink.create({
tenantId: 'biz_123',
userId: 'user_456',
toolkits: { enable: ['zoho_books', 'razorpay'] },
connectedAccounts: { zoho_books: ['acct_primary'] },
knowledgePacks: { enable: ['in.business_compliance.authority'] },
workbench: { enable: true, sandboxSize: 'standard' },
});Discovery presets
A session chooses how tools are surfaced to the model:
meta_tools
The model gets the small STACKLINK_* discovery loop and searches the catalog at runtime. Best
for large catalogs and token efficiency.
direct_tools
A preloaded set of provider tools is exposed directly as named tools. Best for a small, known toolset.
hybrid
Preload a few high-frequency tools directly and keep the meta-tools for the long tail.
The meta-tool surface
You can also tune exactly which meta-tools appear — the default surface, the connector surface (which
adds STACKLINK_WAIT_FOR_CONNECTIONS), and whether knowledge or platform tools are included. The
session is what binds an MCP server, so these choices flow straight through to any MCP client.
Sessions have a lifecycle: active → closed / failed. Close a session when a conversation ends
to release its scope; logs and evidence persist independently.
Create your first session in minutes
Sessions and everything they scope run on the free plan — 20,000 standard ops a month across 2 projects, hard-capped.