Class SourceTool
java.lang.Object
org.tentackle.maven.plugin.mcp.tool.SourceTool
- All Implemented Interfaces:
ModelTool
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(ModelSession session, ToolArguments args) Executes the tool.Gets the description telling an agent when to use this tool.Gets the JSON schema of the arguments.getName()Gets the tool name as seen by the client.getTitle()Gets the human-readable title.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ModelTool
isReadOnly
-
Field Details
-
NAME
-
FORMATS
The available formats.
-
-
Constructor Details
-
SourceTool
public SourceTool()Creates the tool.
-
-
Method Details
-
getName
-
getTitle
-
getDescription
Description copied from interface:ModelToolGets the description telling an agent when to use this tool.- Specified by:
getDescriptionin interfaceModelTool- Returns:
- the description
-
getInputSchema
Description copied from interface:ModelToolGets the JSON schema of the arguments.- Specified by:
getInputSchemain interfaceModelTool- Returns:
- the schema
-
execute
Description copied from interface:ModelToolExecutes the tool.Invoked with the model lock held, see
ModelSession.call(ModelSession.ModelOperation).- Specified by:
executein interfaceModelTool- Parameters:
session- the model sessionargs- the arguments, never null- Returns:
- the text handed to the model
- Throws:
ModelException- if the model is inconsistent
-