- System Tools — Built-in tools that ship with the database. System tools belong to the
sysschema, are always visible to every user, and cannot be dropped. - User-Defined Tools — Tools that you create with the
CREATE MCP TOOLSQL statement. User-defined tools follow the standard object privilege rules.
sys.mcp_tools system catalog table.
CREATE MCP TOOL
Creates a user-defined MCP tool. When you specify theOR REPLACE clause and the tool already exists, the system replaces the existing tool definition.
Privileges
To create an MCP tool, you must have the CREATE privilege. The user who creates the tool inherits all privileges on the tool. For details, see the Data Control Language (DCL) Statement Reference.
Syntax
SQL
Example
This example creates the
show_tables MCP tool, which lists the user-defined tables in a schema. The tool belongs to the System Information toolset and accepts an optional schema argument.
SQL
CALL MCP TOOL
Executes an MCP tool and returns its result set. Privileges To call an MCP tool, you must have theEXECUTE privilege on the tool. By default, every user can call system tools.
Syntax
SQL
Example
This example calls the
show_tables MCP tool for the public schema.
SQL
DROP MCP TOOL
Drops a user-defined MCP tool. You cannot drop a system tool. When you specify theIF EXISTS clause and the tool does not exist, the system does not return an error.
Privileges
To drop an MCP tool, you must have the DROP privilege on the tool.
Syntax
SQL
Example
This example drops the
show_tables MCP tool.
SQL
EXPORT MCP TOOL
Returns theCREATE MCP TOOL SQL statement that recreates a user-defined MCP tool.
Privileges
To export an MCP tool, you must have the VIEW privilege on the tool.
Syntax
SQL
Example
This example exports the
show_tables MCP tool.
SQL

