@rnsk/tools
Runstack meta tools for the Vercel AI SDK — install and drop 600+ toolkit tools into generateText, streamText, or agent loops.
Source: https://runstack.engineer/docs/rnsk-tools
@rnsk/tools wraps the Runstack MCP server as native Vercel AI SDK tools. One import gives your model the same MCP tools as the hosted MCP server: discover tools, check auth, connect OAuth, and execute — without stuffing hundreds of tool schemas into context.
Install
npm install @rnsk/tools ai zod
Create an API key (rnsk_…) in the Runstack app and store it in an environment variable (for example RUNSTACK_API_KEY). See API Keys.
Quick start
await generateText({
model: "anthropic/claude-sonnet-4-5",
prompt: "Star the vercel/ai repo on GitHub and email me a confirmation.",
tools: runstackTools(process.env.RUNSTACK_API_KEY!),
})
Use the same tools object with streamText, ToolLoopAgent, or any AI SDK entry point that accepts a tool map.
Scope to one or more toolkits
When the agent only needs specific products, pass toolkit ids (same field as @rnsk/toolkits manifests). All four meta tools are still returned; search_tools results are filtered to those toolkits.
// One toolkit
tools: runstackTools("github", process.env.RUNSTACK_API_KEY!)
// Multiple toolkits
tools: runstackTools(process.env.RUNSTACK_API_KEY!, {
toolkitIds: ["github", "gmail"],
})
Find the id on each toolkit docs page — it appears as a badge next to category, auth type, and tool count (for example web-search on the Firecrawl page).
Scope to Studio agents
Limit tool discovery to the toolkits in a Studio agent workflow by passing its agent id (copy from the agent card in Studio):
// One agent
tools: runstackTools(process.env.RUNSTACK_API_KEY!, {
agentIds: "paste-agent-id-here",
})
// Multiple agents
tools: runstackTools(process.env.RUNSTACK_API_KEY!, {
agentIds: ["agent-id-1", "agent-id-2"],
})
Use the agent's role as your system prompt:
const agent = await fetchRunstackAgent("paste-agent-id-here", process.env.RUNSTACK_API_KEY!)
await generateText({
model: "anthropic/claude-sonnet-4-5",
system: buildAgentSystemPrompt(agent),
prompt: "Your task here",
tools: runstackTools(process.env.RUNSTACK_API_KEY!, { agentIds: agent.id }),
})
See Runstack Studio for building agents and finding ids.
Merge with your own tools
const tools = {
...runstackTools(process.env.RUNSTACK_API_KEY!),
myCustomTool: tool({
/* ... */
}),
}
What you get
| Tool | Purpose |
|---|---|
search_tools | Discover tools by ranked keyword query (compact results; expand for full schema) |
check_authentication | See if the user has connected the provider a tool needs |
initiate_connection | OAuth link for the user to connect a toolkit |
execute_tool | Run a discovered tool with typed arguments |
Details: MCP tools.
Related
| Surface | Best for |
|---|---|
@rnsk/tools | AI SDK apps in Node, Edge, or server routes |
| @rnsk/toolkits | Open-source toolkit registry — build or fork connectors |
| MCP Tools | Remote HTTP /mcp for MCP-native clients |
| @rnsk/mcp | stdio bridge for Cursor, Claude Desktop, etc. |