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

Function isPluginTool

packages/opencode/src/tool/registry.ts:321–323  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

319}
320
321function isPluginTool(value: unknown): value is ToolDefinition {
322 return typeof value === "object" && value !== null && "args" in value && "description" in value && "execute" in value
323}
324
325function isJsonSchemaDefinition(value: unknown): value is JSONSchema7Definition {
326 return typeof value === "boolean" || (typeof value === "object" && value !== null && !Array.isArray(value))

Callers 1

registry.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected