nenjo-tool-api
Shared tool contracts for Nenjo agents, model providers, and runtimes.
This crate is intentionally small and independent from the other Nenjo workspace crates. It defines the stable types needed to describe tools, receive model tool calls, execute tools, and return tool results.
Contents
Tool— async trait implemented by concrete runtime tools.ToolSpec— JSON-schema-backed tool registration metadata sent to model providers.ToolCategory— read/write side-effect classification used for guidance and filtering.ToolCall— model-requested tool invocation.ToolResultandToolResultMessage— execution results and provider feedback payloads.ToolAutonomyandToolSecurity— SDK-level policy inputs used when constructing tools.sanitize_tool_nameandsanitize_tool_name_lenient— provider-safe tool name helpers.
Usage
use async_trait;
use json;
use ;
;
Dependency Boundary
nenjo-tool-api must not depend on other Nenjo workspace crates. Workspace crates may depend on it or re-export its types for compatibility, but the ownership of the tool contracts stays here.
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.