MCPcopy
hub / github.com/codeaashu/claude-code / buildSearchResult

Function buildSearchResult

src/tools/ToolSearchTool/ToolSearchTool.ts:110–126  ·  view source on GitHub ↗

* Build the search result output structure.

(
  matches: string[],
  query: string,
  totalDeferredTools: number,
  pendingMcpServers?: string[],
)

Source from the content-addressed store, hash-verified

108 * Build the search result output structure.
109 */
110function buildSearchResult(
111 matches: string[],
112 query: string,
113 totalDeferredTools: number,
114 pendingMcpServers?: string[],
115): { data: Output } {
116 return {
117 data: {
118 matches,
119 query,
120 total_deferred_tools: totalDeferredTools,
121 ...(pendingMcpServers && pendingMcpServers.length > 0
122 ? { pending_mcp_servers: pendingMcpServers }
123 : {}),
124 },
125 }
126}
127
128/**
129 * Parse tool name into searchable parts.

Callers 1

callFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected