MCPcopy
hub / github.com/virattt/dexter / formatToolResult

Function formatToolResult

src/tools/types.ts:6–12  ·  view source on GitHub ↗
(data: unknown, sourceUrls?: string[])

Source from the content-addressed store, hash-verified

4}
5
6export function formatToolResult(data: unknown, sourceUrls?: string[]): string {
7 const result: ToolResult = { data };
8 if (sourceUrls?.length) {
9 result.sourceUrls = sourceUrls;
10 }
11 return JSON.stringify(result);
12}
13
14/**
15 * Parse search results from a search provider response.

Callers 15

createWebFetchFunction · 0.85
browser.tsFile · 0.85
memory-get.tsFile · 0.85
memory-update.tsFile · 0.85
memory-search.tsFile · 0.85
tavily.tsFile · 0.85
langsearch.tsFile · 0.85
exa.tsFile · 0.85
x-search.tsFile · 0.85
perplexity.tsFile · 0.85
crypto.tsFile · 0.85
insider_trades.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected