MCPcopy Create free account
hub / github.com/anomalyco/opencode / schema

Function schema

packages/opencode/src/session/llm/native-request.ts:120–124  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

118}
119
120const schema = (value: unknown): JsonSchema => {
121 if (!isRecord(value)) return { type: "object", properties: {} }
122 if (isRecord(value.jsonSchema)) return value.jsonSchema
123 return value
124}
125
126const tools = (input: Record<string, ToolInput> | undefined): ToolDefinition[] =>
127 Object.entries(input ?? {}).map(([name, item]) =>

Callers 1

toolsFunction · 0.70

Calls 1

isRecordFunction · 0.90

Tested by

no test coverage detected