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

Function getValueAndImplied

client/src/components/ToolsTab.tsx:104–110  ·  view source on GitHub ↗
(
    value: boolean | undefined,
    defaultValue: boolean,
  )

Source from the content-addressed store, hash-verified

102}) => {
103 // Spec defaults: readOnlyHint=false, destructiveHint=true, idempotentHint=false, openWorldHint=true
104 const getValueAndImplied = (
105 value: boolean | undefined,
106 defaultValue: boolean,
107 ): { value: boolean; implied: boolean } => ({
108 value: value ?? defaultValue,
109 implied: value === undefined,
110 });
111
112 const readOnly = getValueAndImplied(annotations?.readOnlyHint, false);
113 const destructive = getValueAndImplied(annotations?.destructiveHint, true);

Callers 1

AnnotationBadgesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected