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

Function summarizeSchemas

backend/api/mcp/tool_schema.go:719–733  ·  view source on GitHub ↗
(sections []SchemaSection)

Source from the content-addressed store, hash-verified

717}
718
719func summarizeSchemas(sections []SchemaSection) schemaStats {
720 stats := schemaStats{schemaNames: make([]string, 0, len(sections))}
721 for _, section := range sections {
722 if section.Name != "" {
723 stats.schemaNames = append(stats.schemaNames, section.Name)
724 }
725 stats.totalTables += len(section.Tables)
726 stats.totalViews += len(section.Views)
727 stats.totalFunctions += section.FunctionCount
728 if section.Truncated {
729 stats.truncatedAny = true
730 }
731 }
732 return stats
733}
734
735// formatTableNotFound returns an MCP result for the TABLE_NOT_FOUND error path.
736func formatTableNotFound(database, table string, candidates []string) *mcp.CallToolResult {

Callers 1

writeSchemasHeaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected