DatabaseQueryTool class
SQL validation and execution tool with safety constraints
- Inheritance
-
- Object
- McpToolBase
- DatabaseQueryTool
Constructors
Properties
- description → String
-
Tool description for AI agents
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
inputSchema
→ Map<
String, dynamic> -
Input schema (JSON Schema format)
no setteroverride
-
metadata
→ Map<
String, dynamic> -
Get tool metadata as a map (for tool listing)
no setterinherited
- name → String
-
Tool name (must be unique across all tools)
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
execute(
McpRequest request) → Future< McpResponse> -
Execute the tool with given request
inherited
-
executeImpl(
Map< String, dynamic> params) → Future -
Implement the actual tool logic
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateParams(
Map< String, dynamic> ? params) → String? -
Validate parameters before execution
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaultMaxRows → const int
- Default row limit
- maxConnections → const int
- Maximum concurrent connections
- maxRows → const int
- Maximum rows to prevent data dumps
- queryTimeout → const Duration
- Query timeout in seconds