Custom Tools

LiyanLabs supports two tool extension paths. Builtin tools are first-party Go code shipped with the service. User and third-party integrations are provided through MCP and execute on the explicitly selected Desktop or Runner.

Choose an Extension Path

NeedUse
Add a core capability maintained and released with LiyanLabsBuiltin tool
Connect a user-owned API, local file, or device capabilityMCP tool
Update an integration independently from the LiyanLabs serviceMCP tool

Builtin Tools

Builtin tools are repository changes, not runtime user scripts. A complete builtin contribution updates all of these current Go surfaces together:

  • service/pkg/core/tools/ — stable tool ID, display metadata, description, category, and context requirements
  • service/pkg/worker/chatdriver/toolprep/ — JSON schema, availability gates, executor, and error handling
  • service/pkg/core/toolstrategy/ — feature/profile membership when the tool is configurable
  • focused tests for catalog exposure, preparation, execution, and authorization

The metadata ID, prepared schema name, and executor-map key must be identical. Tool preparation is authoritative: an explicit empty selection exposes no tools, unavailable dependencies fail closed, and a surfaced tool must always have a matching executor.

MCP Tools

Use MCP for custom integrations that should not become part of the LiyanLabs service. Add the MCP provider in LiyanLabs, grant the required permissions, and select it for the agent. The provider advertises its tool names, descriptions, and input schemas; LiyanLabs materializes only the tools authorized for the current user and session.

MCP execution is local-first. Provider processes, operational credentials, tool calls, and provider-accessed files remain on the explicitly selected Desktop or Runner. If that device or its verified runtime is unavailable, the tool is unavailable; LiyanLabs does not move the call to another device or a hosted fallback.

See MCP Servers for connection and testing instructions.