ToolSpec#
Let a model keep its own tools and notes in a repository on disk. See the guide.
- class zett_agent.jit_harness.host.ToolSpec(name, description, parameters, guidelines, snippet, execution_mode, return_schema=None, returns_description='')[源代码]#
Everything the agent needs to know about a repository tool before calling it.
It is the serializable half of an
AgentTool: the schema and the prompt-facing text, without the handler that only lives where the code runs.- 参数:
name (str)
description (str)
parameters (dict[str, JsonValue])
guidelines (tuple[str, ...])
snippet (str)
execution_mode (ToolExecutionMode)
return_schema (dict[str, JsonValue] | None)
returns_description (str)
- classmethod from_json(payload)[源代码]#
Read one spec from the child, rejecting anything that is not a tool description.
- build(invoke)[源代码]#
Rebuild the tool in the agent, with
invokeas its handler.- 参数:
invoke (Callable[[dict[str, JsonValue]], Awaitable[ToolResult]])
- 返回类型: