selectDataSource picks READ_ONLY if available, otherwise ADMIN.
(dataSources []dataSource)
| 309 | |
| 310 | // selectDataSource picks READ_ONLY if available, otherwise ADMIN. |
| 311 | func selectDataSource(dataSources []dataSource) string { |
| 312 | var adminID string |
| 313 | for _, ds := range dataSources { |
| 314 | if ds.Type == "READ_ONLY" { |
| 315 | return ds.ID |
| 316 | } |
| 317 | if ds.Type == "ADMIN" { |
| 318 | adminID = ds.ID |
| 319 | } |
| 320 | } |
| 321 | return adminID |
| 322 | } |
| 323 | |
| 324 | // formatAmbiguousResult returns an MCP result for ambiguous database matches. |
| 325 | func formatAmbiguousResult(database string, candidates []Candidate) *mcp.CallToolResult { |
no outgoing calls
no test coverage detected