MCPcopy Create free account
hub / github.com/bytebase/bytebase / registerQueryTool

Method registerQueryTool

backend/api/mcp/tool_query.go:60–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

registerToolsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected