execute_custom_query
Execute custom SQL SELECT queries to analyze data relationships within the Spanish stock exchange database.
Instructions
Execute a custom SQL query on the database (SELECT only)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | Optional parameters for the query | |
| sql | Yes | SQL SELECT query to execute |
Implementation Reference
- src/index.ts:544-565 (registration)Tool registration including name, description, and input schema definition for 'execute_custom_query'{ name: 'execute_custom_query', description: 'Execute a custom SQL query on the database (SELECT only)', inputSchema: { type: 'object', properties: { sql: { type: 'string', description: 'SQL SELECT query to execute', }, params: { type: 'array', items: { type: 'string', }, description: 'Optional parameters for the query', default: [], }, }, required: ['sql'], }, },
- src/index.ts:690-692 (handler)MCP tool handler dispatcher for 'execute_custom_query' that delegates to DatabaseManager.executeCustomQuerycase 'execute_custom_query': result = await this.db.executeCustomQuery((args as any)?.sql, (args as any)?.params || []); break;
- src/database.ts:345-347 (handler)Core implementation of executeCustomQuery in DatabaseManager, which rejects custom SQL queries as not supported by the APIasync executeCustomQuery(sql: string, params: any[] = []): Promise<any[]> { throw new Error('Custom SQL queries are not supported via the Cloudflare Worker API. Please use the specific endpoints available.'); }