MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / toolset_call

Function toolset_call

tests/lib/tools/test_runner_eager_tools.py:807–818  ·  view source on GitHub ↗

The model calls the tool `name` of a toolset with the id `toolu_ `. By default it is the computer toolset's `key` tool. Without a `toolset_name` it is a call named like a toolset, which the runner can't route.

(
    key: str, name: str = "key", input: dict[str, Any] | None = None, toolset_name: str | None = "computer"
)

Source from the content-addressed store, hash-verified

805
806
807def toolset_call(
808 key: str, name: str = "key", input: dict[str, Any] | None = None, toolset_name: str | None = "computer"
809) -> Block:
810 """The model calls the tool `name` of a toolset with the id `toolu_<key>`. By default it is the computer toolset&#x27;s
811 `key` tool. Without a `toolset_name` it is a call named like a toolset, which the runner can&#x27;t route."""
812 return {
813 "type": "tool_use",
814 "key": key,
815 "json": json.dumps({"text": key} if input is None else input),
816 "name": name,
817 **({"toolset_name": toolset_name} if toolset_name is not None else {}),
818 }
819
820
821def text(value: str) -> Block:

Calls

no outgoing calls

Tested by

no test coverage detected