MCPcopy Index your code
hub / github.com/modelcontextprotocol/inspector / hasValidMetaPrefix

Function hasValidMetaPrefix

client/src/utils/metaUtils.ts:129–136  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

127 * @see https://modelcontextprotocol.io/specification/2025-06-18/basic/index#meta
128 */
129export const hasValidMetaPrefix = (key: string): boolean => {
130 const prefixSegment = getPrefixSegment(key);
131 if (prefixSegment === null) {
132 return true;
133 }
134
135 return splitLabels(prefixSegment) !== null;
136};
137
138const extractMetaName = (key: string): string => {
139 const trimmedKey = key.trim();

Callers 4

filterReservedMetadataFunction · 0.90
updateMetadataFunction · 0.90
MetadataTabFunction · 0.90
ToolsTabFunction · 0.90

Calls 2

getPrefixSegmentFunction · 0.85
splitLabelsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…