MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / getMcpOutputSchema

Function getMcpOutputSchema

src/core/structured-output-schema.ts:226–242  ·  view source on GitHub ↗
(ref: StructuredOutputSchemaRef)

Source from the content-addressed store, hash-verified

224}
225
226export function getMcpOutputSchema(ref: StructuredOutputSchemaRef): JsonObject {
227 assertSchemaRef(ref);
228 const cacheKey = `${ref.schema}@${ref.version}`;
229 const cached = bundledSchemaCache.get(cacheKey);
230 if (cached) {
231 return cloneJson(cached);
232 }
233
234 const rootSchema = readJsonObject(schemaPathFor(ref), `${ref.schema}@${ref.version}`);
235
236 const schemasDir = getStructuredOutputSchemasDir();
237 const commonSchemaPath = path.join(schemasDir, '_defs', 'common.schema.json');
238 const commonSchema = readJsonObject(commonSchemaPath, 'common structured output definitions');
239 const bundled = bundleSchema(rootSchema, commonSchema);
240 bundledSchemaCache.set(cacheKey, bundled);
241 return cloneJson(bundled);
242}
243
244function getMcpOutputSchemaForRegistrationJson(ref: StructuredOutputSchemaRef): JsonObject {
245 const toolSchema = getMcpOutputSchema(ref);

Calls 7

assertSchemaRefFunction · 0.85
cloneJsonFunction · 0.85
readJsonObjectFunction · 0.85
schemaPathForFunction · 0.85
bundleSchemaFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected