MCPcopy Create free account
hub / github.com/modelcontextprotocol/inspector / isPropertyRequired

Function isPropertyRequired

client/src/utils/schemaUtils.ts:151–156  ·  view source on GitHub ↗
(
  propertyName: string,
  schema: JsonSchemaType,
)

Source from the content-addressed store, hash-verified

149 * @returns true if the property is required, false otherwise
150 */
151export function isPropertyRequired(
152 propertyName: string,
153 schema: JsonSchemaType,
154): boolean {
155 return schema.required?.includes(propertyName) ?? false;
156}
157
158/**
159 * Resolves $ref references in JSON schema

Callers 3

AppsTabFunction · 0.90
ToolsTabFunction · 0.90
generateDefaultValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected