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

Function filterReservedMetadata

client/src/App.tsx:127–143  ·  view source on GitHub ↗
(
  metadata: Record<string, string>,
)

Source from the content-addressed store, hash-verified

125};
126
127const filterReservedMetadata = (
128 metadata: Record<string, string>,
129): Record<string, string> => {
130 return Object.entries(metadata).reduce<Record<string, string>>(
131 (acc, [key, value]) => {
132 if (
133 !isReservedMetaKey(key) &&
134 hasValidMetaPrefix(key) &&
135 hasValidMetaName(key)
136 ) {
137 acc[key] = value;
138 }
139 return acc;
140 },
141 {},
142 );
143};
144
145const App = () => {
146 const [resources, setResources] = useState<Resource[]>([]);

Callers 2

AppFunction · 0.85
handleMetadataChangeFunction · 0.85

Calls 3

isReservedMetaKeyFunction · 0.90
hasValidMetaPrefixFunction · 0.90
hasValidMetaNameFunction · 0.90

Tested by

no test coverage detected