Function Tool Settings
Buka di CMSThe function tool settings define how the AI model recognises and invokes the SQL Database Reader. These fields control the plugin's identity within the agent's reasoning: what it is called, what kind of questions it handles, what to display while it runs, and what constraints apply at execution time.
Navigate to Actions → Plugins → SQL Database Reader → Function in the agent sidebar.
Function Name
The function name is the identifier the AI uses internally when deciding to call this plugin. It must be unique among all plugins configured for this agent.
Naming rules:
- Must start with a letter
- May contain letters, digits, and underscores only
- No spaces, hyphens, or special characters
Valid examples: query_crm_data, getOrderStatus, inventoryLookup
Generating a function name with AI
Click Generate Name and provide a short description of what database this plugin reads. The AI will suggest a name that follows the naming rules and reflects the data context.
Function Description
The description tells the AI when to call this plugin. When a user sends a message, the agent reads this description to decide whether the SQL Database Reader is the right tool to use.
Write the description from the agent's perspective — describe the data that is accessible, not how the plugin works internally.
Example:
Query the company's sales database to retrieve order history, revenue figures, customer account details, and product inventory levels.
Generating a description with AI
After selecting tables and columns in the schema configuration, click Generate Description. The AI analyses your schema selection and writes a description that matches the data scope automatically.
Loading Text
The message shown to the user while the query is being executed. Use it to set expectations and reflect the nature of the data being retrieved.
Examples:
Retrieving data from the CRM...Looking up your order history...Querying inventory levels...
Rules
Instructions the AI must follow when generating SQL for this plugin. Use this field to enforce business constraints and prevent unintended queries.
Common rules:
Only generate SELECT queries. Never generate INSERT, UPDATE, or DELETE statements.
Do not return more than 500 rows per query.
If the user's question is ambiguous, ask for clarification before querying.
Do not expose columns that contain passwords or internal system codes.
Response Prompt
Instructions for how the AI should format and present the query results to the user after execution.
Examples:
Present results as a readable summary with key figures highlighted.
Format numerical values with thousand separators and two decimal places.
If the result set is empty, explain that no matching records were found.
If there is more than one row, present the data as a numbered list.
Query Logging
By default every query this plugin runs is recorded on the Logs tab: the question that was asked, the SQL that was generated for it, whether it succeeded, and how many rows came back.
Turn Enable Query Logging off when the questions themselves are sensitive — the wording of a question can reveal as much as the data behind it, and in some organisations that record is not one the agent owner is allowed to keep.
While the switch is off, nothing about a query is recorded: not a successful run, not a failure, and not a question the AI could not turn into SQL. Queries still run and still answer normally, and the Logs tab says the setting is off so an unchanging summary is not mistaken for a broken page.
Turning logging off does not delete what is already stored. Existing entries remain visible until they expire after 30 days.
Switching the setting back on resumes recording from the next query — the queries that ran while it was off are gone for good, so leave it on if you may later need to audit or troubleshoot what the agent asked the database.
Saving the Configuration
After filling in all fields, click Save. The function definition is registered with the agent and the AI will begin recognising questions within this plugin's scope.
Related Pages
- Configure Tables and Columns — schema selection feeds the description generator.
- Testing Queries — verify that the AI invokes the plugin for the right questions.
- SQL Database Reader Overview