MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / toolChoiceJsonSchema

Function toolChoiceJsonSchema

src/llm/constrained.ts:186–195  ·  view source on GitHub ↗
(toolNames: string[])

Source from the content-addressed store, hash-verified

184 * Not used for ordinary turns, where the model must be free to answer in prose.
185 */
186export function toolChoiceJsonSchema(toolNames: string[]): JsonSchemaNode {
187 return {
188 type: 'object',
189 properties: {
190 name: { type: 'string', enum: [...toolNames] },
191 arguments: { type: 'object' },
192 },
193 required: ['name', 'arguments'],
194 };
195}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected