@rnsk/tools
v0.1.2
Published
Runstack meta-tools for the Vercel AI SDK. Drop-in tools for any agentic workflow, backed by the Runstack MCP server.
Readme
@rnsk/tools
Runstack meta-tools for the Vercel AI SDK. Drop 1000+ connector apps and tools into any agentic workflow with one line.
📚 Docs: https://runstack.engineer/docs
Backed by the Runstack — your agent gets a discover - authenticate - execute loop that scales to every tool in the Runstack registry without bloating your model's context window.
Install
npm install @rnsk/tools ai zodGet an API key (rnsk_…) at runstack.engineer.
Usage
All connectors
import { generateText } from 'ai';
import { runstackTools } from '@rnsk/tools';
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!),
});Scoped to one or more toolkits
When you only need specific toolkits, scope search_tools to them by toolkit id (same as @rnsk/toolkits). All 4 meta tools are still returned so the agent can authenticate and execute as needed.
// One toolkit
tools: runstackTools('github', process.env.RUNSTACK_API_KEY!)
// Multiple toolkits
tools: runstackTools(process.env.RUNSTACK_API_KEY!, {
toolkitIds: ['github', 'gmail'],
})Toolkit ids are listed on each toolkit docs page at runstack.engineer/docs/toolkits.
Scoped to Studio agents
Pass agentIds to limit discovery to toolkits in a Studio agent workflow. Copy the id from the agent card.
tools: runstackTools(process.env.RUNSTACK_API_KEY!, {
agentIds: 'paste-agent-id-here',
})Use fetchRunstackAgent() and buildAgentSystemPrompt() for the agent role. See Runstack Studio.
How it works
runstackTools() returns four AI SDK tool() definitions:
| Tool | Purpose |
| --------------------- | ------------------------------------------------------------- |
| search_tools | Discover tools by regex over names and descriptions |
| check_authentication| Verify the user has connected the required provider |
| initiate_connection | Get an OAuth link for the user to connect a provider |
| execute_tool | Run any discovered tool with type-coerced arguments |
Each call is forwarded as a JSON-RPC tools/call request to the Runstack MCP server (https://app.runstack.engineer/mcp) with your API key.
