Package org.mcpjava.server.tools
Annotation Interface Tool.Annotations
- Enclosing class:
Tool
Nested annotation for tool behavioral hints.
These hints help clients understand the tool's behavior and side effects.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanIf true, this tool may perform destructive updates to its environment.booleanIf true, calling the tool repeatedly with the same arguments will have no additional effect on its environment (safe to retry).booleanIf true, this tool may interact with an "open world" of external entities.booleanIf true, this tool only reads data and does not modify its environment.A human-readable title for the tool.
-
Element Details
-
title
String titleA human-readable title for the tool.- Returns:
- the tool title
- Default:
""
-
readOnlyHint
boolean readOnlyHintIf true, this tool only reads data and does not modify its environment.Default is false, assuming tools may have side effects.
- Returns:
- true if read-only
- Default:
false
-
destructiveHint
boolean destructiveHintIf true, this tool may perform destructive updates to its environment. If false, the tool performs only additive updates.Default is true to err on the side of caution.
- Returns:
- true if potentially destructive
- Default:
true
-
idempotentHint
boolean idempotentHintIf true, calling the tool repeatedly with the same arguments will have no additional effect on its environment (safe to retry).Default is false.
- Returns:
- true if idempotent
- Default:
false
-
openWorldHint
boolean openWorldHintIf true, this tool may interact with an "open world" of external entities. If false, the tool's domain of interaction is closed.Default is true, assuming tools may interact with external systems.
- Returns:
- true if open world
- Default:
true
-