npx skills add ...
npx skills add cognitedata/builder-skills --skill create-client-tool
Scaffolds an AtlasTool for an already-approved in-app useAtlasChat UI. For EOS sidebar tools, use integrate-fusion-agent (createAgentAction) instead. Triggers: AtlasTool, useAtlasChat tool, in-app atlas client tool.
npx skills add cognitedata/builder-skills --skill create-client-tool
Scaffold an AtlasTool named $ARGUMENTS. If the app has no approved in-app useAtlasChat, implement a Fusion action via integrate-fusion-agent instead.
Prerequisite: vendored src/atlas-agent/ and @sinclair/typebox from integrate-atlas-chat.
Client tools let the Atlas Agent invoke browser-side logic — charts, local state, UI panels, navigation. The agent decides when to call; the app executes and returns a result.
clientTool actionexecute() runs in the browser and returns { output, details }output (string) is sent back to the agentdetails is available on message.toolCalls for the UI to renderBefore writing anything, read:
useAtlasChat is called (often src/App.tsx or a chat hook) to find where tools is passed — imports are typically from ./atlas-agent/react after integrate-atlas-chatUse Type from @sinclair/typebox for the parameters schema (compile-time types + runtime validation).
Adjust the ./atlas-agent/... path if the tool file is not directly under src/ next to the atlas-agent folder (for example ../atlas-agent/types from src/tools/).
| Schema | Usage |
|---|---|
Type.String() | string |
Type.Number() | number |
Type.Boolean() | boolean |
Type.Literal("foo") | exact value |
Type.Union([Type.Literal("a"), Type.Literal("b")]) | enum |
Type.Array(Type.String()) | string[] |
Type.Object({ ... }) | object |
Type.Optional(...) | mark any field optional |
Always add a description on the tool and on each parameter — the agent uses those strings.
Find the useAtlasChat call and add the tool to the tools array:
If the tool returns structured details, render them in the message list.
message.toolCalls is a ToolCall[] — one entry per tool call (client-side and server-side) in call order.
const { messages, send, ... } = useAtlasChat({
client: isLoading ? null : sdk,
agentExternalId: AGENT_EXTERNAL_ID,
tools: [myTool], // add here
});{msg.toolCalls?.map((tc, i) => (
// tc.name — tool name
// tc.output — the string sent back to the agent
// tc.details — your structured data (cast to your known shape)
<MyToolOutput key={i} data={tc.details as MyToolDetails} />
))}