MCPcopy Index your code
hub / github.com/github/copilot-sdk / toJsonSchema

Function toJsonSchema

nodejs/src/client.ts:152–158  ·  view source on GitHub ↗

* Convert tool parameters to JSON schema format for sending to CLI

(parameters: Tool["parameters"])

Source from the content-addressed store, hash-verified

150 * Convert tool parameters to JSON schema format for sending to CLI
151 */
152function toJsonSchema(parameters: Tool["parameters"]): Record<string, unknown> | undefined {
153 if (!parameters) return undefined;
154 if (isZodSchema(parameters)) {
155 return parameters.toJSONSchema();
156 }
157 return parameters;
158}
159
160/** Implicit provider name for the singular, whole-session {@link ProviderConfig}. */
161const DEFAULT_PROVIDER_NAME = "default";

Callers 2

createSessionMethod · 0.85
resumeSessionMethod · 0.85

Calls 2

isZodSchemaFunction · 0.85
toJSONSchemaMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…