Documentation Index
Fetch the complete documentation index at: https://rag-docs.peakfs.io/llms.txt
Use this file to discover all available pages before exploring further.
Description
The Run SQL tool allows the execution of custom SQL queries on the database using Prisma’s raw query capabilities. This tool is intended for direct SQL access, enabling agents to retrieve database information as specified in the query.Arguments
query (string): The SQL query to be executed.
Example Configuration
Example Usage
- User Query: “Show the last two transactions from the Transaction table.”
- Agent Invocation: The agent calls run_sql with a SQL query like:
- Response: The tool returns the specified transaction data in descending order by date.
Response Handling
- Successful Response: If the query executes successfully, the function returns an object with:
result: The query results as an array of records.
- Error Handling: If the query fails, an error message and the original query are returned for debugging.