MCPcopy Index your code
hub / github.com/anomalyco/opencode / tool

Method tool

packages/opencode/test/lib/llm-server.ts:512–517  ·  view source on GitHub ↗
(name: string, input: unknown)

Source from the content-addressed store, hash-verified

510 }
511
512 tool(name: string, input: unknown) {
513 const id = this.#id()
514 const args = JSON.stringify(input)
515 this.#tail = [...this.#tail, toolStartLine(id, name), toolArgsLine(args)]
516 return this.toolCalls()
517 }
518
519 pendingTool(name: string, input: unknown) {
520 const id = this.#id()

Callers 15

tutorial.tsFile · 0.45
continuationRequestFunction · 0.45
runWeatherToolLoopFunction · 0.45
llm.test.tsFile · 0.45
runToolsFunction · 0.45
gemini.test.tsFile · 0.45

Calls 4

#idMethod · 0.95
toolCallsMethod · 0.95
toolStartLineFunction · 0.85
toolArgsLineFunction · 0.85

Tested by

no test coverage detected