MCPcopy Create free account
hub / github.com/bytebase/dbhub / buildSourceDescriptionPrefix

Function buildSourceDescriptionPrefix

src/utils/tool-metadata.ts:63–67  ·  view source on GitHub ↗
(description: string | undefined)

Source from the content-addressed store, hash-verified

61 * "(read-only)" -> "(read-only). " (closing paren is mid-sentence)
62 */
63export function buildSourceDescriptionPrefix(description: string | undefined): string {
64 const trimmed = description?.trim() ?? "";
65 if (!trimmed) return "";
66 return /[.!?:]$/.test(trimmed) ? `${trimmed} ` : `${trimmed}. `;
67}
68
69/**
70 * Convert a Zod schema object to simplified parameter list

Callers 3

getExecuteSqlMetadataFunction · 0.85
getSearchObjectsMetadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected