Class MibSearchTool
java.lang.Object
org.snmp4j.mcp.tool.mib.search.MibSearchTool
- All Implemented Interfaces:
McpTool
An MCP Tool that exposes search functionality for MIB (Management Information Base) definitions
using the underlying
SmiManager.
Supported operations include finding SMI objects by OID, name, type, or module.
- Since:
- 0.0.1
- Version:
- 0.1.0
- Author:
- SNMP4J.org
-
Constructor Summary
ConstructorsConstructorDescriptionMibSearchTool(com.snmp4j.smi.SmiManager smiManager) Creates a new MIB Search Tool instance. -
Method Summary
Modifier and TypeMethodDescriptionExecutes the tool with the provided parameters.Gets the description for this tool.getId()Gets the unique identifier for this tool.getName()Gets the display name for this tool.Gets the supported parameters for this tool.Gets the contexts that this tool requires.getTitle()Gets the title associated with this tool.Gets the version of this tool.booleanChecks if the tool is available in the current environment.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface McpTool
getAnnotation
-
Constructor Details
-
MibSearchTool
public MibSearchTool(com.snmp4j.smi.SmiManager smiManager) Creates a new MIB Search Tool instance.- Parameters:
smiManager- the SmiManager instance used to perform MIB lookups.
-
-
Method Details
-
getId
-
getName
-
getTitle
-
getDescription
Description copied from interface:McpToolGets the description for this tool.- Specified by:
getDescriptionin interfaceMcpTool- Returns:
- the tool description
-
getVersion
Description copied from interface:McpToolGets the version of this tool.- Specified by:
getVersionin interfaceMcpTool- Returns:
- the tool version
-
getParameters
Description copied from interface:McpToolGets the supported parameters for this tool.- Specified by:
getParametersin interfaceMcpTool- Returns:
- a list of parameter descriptions
-
execute
Description copied from interface:McpToolExecutes the tool with the provided parameters.- Specified by:
executein interfaceMcpTool- Parameters:
params- the parameters to use- Returns:
- the result of the execution
- Throws:
McpToolException- if the tool execution fails
-
isAvailable
public boolean isAvailable()Description copied from interface:McpToolChecks if the tool is available in the current environment.- Specified by:
isAvailablein interfaceMcpTool- Returns:
- true if the tool is available, false otherwise
-
getRequiredContexts
Description copied from interface:McpToolGets the contexts that this tool requires.- Specified by:
getRequiredContextsin interfaceMcpTool- Returns:
- a list of required context IDs
-