Skip to Content
Technical referenceTools and skills reference

Tools and skills reference

Release requirement: This guide uses Studio extension APIs that are not present in npm @flexkit/studio@0.0.31. See package availability before using the example.

Import defineTool and defineSkill from @flexkit/studio/tools. Register their returned values with the framework handler’s tools and skills options.

defineTool

PropertyContract
nameCamelCase identifier; must not begin with custom_.
descriptionNonempty description, trimmed by the helper.
inputZod schema used to validate invocation arguments.
executeReceives validated input and actor; returns a value or promise.

A Chat actor has kind: 'chat', userId, role, and spaceCodes. An automation actor has kind: 'automation', automationId, nullable spaceId, and spaceCodes. Authorize business actions explicitly based on the appropriate actor branch.

defineSkill

PropertyContract
nameNonempty sync identity, up to 120 characters.
descriptionNonempty summary, up to 500 characters.
contentNonempty instructions, up to 50,000 characters.
spaceOptional nonempty deployed space code.

Names must be unique within registered skills. A rename changes sync identity and removes the prior skill’s attachments. See code-defined skills.

Endpoint and secrets

The adapter exposes signed GET discovery and POST invocation at /api/flexkit/tools. Configure FLEXKIT_TOOLS_SECRET and optionally the previous secret during rotation. These are server secrets, not Studio public configuration.

See custom tools for a complete example and security for authorization and failure handling.

Last updated on

© 2026