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

Function updateEntry

client/src/components/MetadataTab.tsx:45–54  ·  view source on GitHub ↗
(
    index: number,
    field: "key" | "value",
    value: string,
  )

Source from the content-addressed store, hash-verified

43 };
44
45 const updateEntry = (
46 index: number,
47 field: "key" | "value",
48 value: string,
49 ) => {
50 const newEntries = [...entries];
51 newEntries[index][field] = value;
52 setEntries(newEntries);
53 updateMetadata(newEntries);
54 };
55
56 const updateMetadata = (newEntries: MetadataEntry[]) => {
57 const metadataObject: Record<string, string> = {};

Callers 1

MetadataTabFunction · 0.85

Calls 1

updateMetadataFunction · 0.85

Tested by

no test coverage detected