ToolDefinition
Swift
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift
- struct ToolDefinition : struct ToolDefinition
- Bases:
One MCP tool as a client sees it: what to call it, and what it is for.
The prose fields are the model's only basis for choosing between tools, so they carry the distinction rather than restating the name — see
summaryand the guidance after it.
Members
-
What the client names in a
ToolCall.
-
A short human label, shown by clients that render one.
-
What the tool answers, for a model choosing between them. First line of the description, and the only part some clients show.
-
When to reach for this one rather than a neighbour, and what the result means. Empty for tools whose summary says everything.
- arguments : let arguments: [ToolArgument]
- outputSchema : let outputSchema: JSONValue?
-
What the tool answers with, when that shape is guaranteed. Declared only where it is: MCP requires
structuredContentto conform to this, so a schema the server may break is worse than none at all.
- processReach : let processReach: ProcessReach
- tmuxEffects : let tmuxEffects: Set<TmuxEffect>
- outputClasses : let outputClasses: Set<OutputClass>
- mayExposeSecrets : let mayExposeSecrets: Bool
- mayReturnUntrustedContent : let mayReturnUntrustedContent: Bool
- explicitAnnotations : let explicitAnnotations: ToolAnnotations
- inputSinks : let inputSinks: [String : Set<InputSink>]
- nestedAuthority : let nestedAuthority: Set<String>
- amplifiesFutureInput : let amplifiesFutureInput: Bool