()
| 58 | query_database(database="employee", instance="prod-pg", statement="SELECT count(*) FROM orders")` |
| 59 | |
| 60 | func (s *Server) registerQueryTool() { |
| 61 | mcp.AddTool(s.mcpServer, &mcp.Tool{ |
| 62 | Name: "query_database", |
| 63 | Description: queryDatabaseDescription, |
| 64 | }, s.handleQueryDatabase) |
| 65 | } |
| 66 | |
| 67 | func (s *Server) handleQueryDatabase(ctx context.Context, req *mcp.CallToolRequest, input QueryInput) (*mcp.CallToolResult, any, error) { |
| 68 | if input.Database == "" { |