Creating an MCP Toolset
- In the Model Context Protocol Servers page, select the MCP server you want.
- In the specific MCP server page, select the Toolsets tab.
- Click Create Model Context Protocol Toolset.
- Enter the following details for creating the toolset.
- Name: Enter a name for the toolset.
- Description: Enter a description for the toolset.
- Compartment: Select the compartment for the toolset.
- Type: Select from the following
options:
- Custom SQL tool: Enables you to run user-defined SQL or PL/SQL scripts that can take input parameters.
- Built-in SQL tools: Enables you to run
ad-hoc SQL or PL/SQL scripts , and also perform common
database operations.
Note
Restrict database user privileges to the minimum required to prevent unintended or unauthorized changes. - Customizable reporting tools: Enables
you to find and run prebuilt, parameter-driven SQL
reports.
Note
SQL Reports need to be first created using Database Tools SQL Reports. Only then will the reports appear in the list- dbtools_list_reports: Retrieves a list of all predefined reports that are available for execution.
- dbtools_execute_report: Executes a predefined report and returns its results.
- dbtools_get_report_source: Retrieves the underlying SQL query for a predefined report.
- dbtools_get_tool_request: Retrieves the current status and (if available) the final result of a previously submitted asynchronous tool call.
- Default execution type: Specifies how tool
requests are executed. Use Synchronous for immediate
responses, or Asynchronous for long-running operations where
results can be retrieved later using a request identifier.The
default is Synchronous.
When asynchronous execution is enabled for a toolset, a tool request can either return an immediate result or a response indicating that the request is being processed. In such cases, the response includes information that the MCP client can use to check the status until the request completes and retrieve the final result.
Asynchronous execution requires a storage option to be configured for the MCP Server. Supported storage options include NONE and OBJECT_STORAGE.
For more information about the tool types, see Prebuilt and Custom Tools
-
For Custom SQL, enter:
- Tool name: Enter the tool name to display in the MCP client.
- Tool description: Enter the tool
description to display in the MCP client.
Note
TheTool nameanddescriptionalso helps the LLM understand what the tool does. If you provide clearer, more detailed descriptions, that will lead to better results.The LLM uses the tool description to understand what each reporting tool does and to decide when to use them.
- Allowed Roles: Select the allowed roles from the list. For more information about roles, see Application Roles.
- SQL source: Enter or upload the SQL source code.
- Variables: Enter name, type and description for each variable that is added.. The better the name and description, the better the LLM uses them.
- Click Create. The new toolset appears on the Toolsets page.
Use the following commands to create an MCP Toolset.
oci dbtools mcp-toolset create-mcp-toolset-built-in-sql-tools --compartment-id <compartment_ocid> --display-name <display_name> --mcp-server-id <mcp_serer_ocid> --toolset-version <toolset_version> oci dbtools mcp-toolset create-mcp-toolset-custom-sql-tool --compartment-id <compartment_ocid> --display-name <display_name> --mcp-server-id <mcp_serer_ocid> --source (*) --tool-name <tool-name> --toolset-version <toolset_version> oci dbtools mcp-toolset create-mcp-toolset-customizable-reporting-tools --compartment-id <compartment_ocid> --display-name <display_name> --mcp-server-id <mcp_serer_ocid> --reports (*) --toolset-version <toolset_version>Use the
DatabaseToolsMcpToolset ReferenceAPI to create an MCP Server.For information about using the API and signing requests, see REST API and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.