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

Function getPrompt

client/src/App.tsx:903–915  ·  view source on GitHub ↗
(name: string, args: Record<string, string> = {})

Source from the content-addressed store, hash-verified

901 };
902
903 const getPrompt = async (name: string, args: Record<string, string> = {}) => {
904 lastToolCallOriginTabRef.current = currentTabRef.current;
905
906 const response = await sendMCPRequest(
907 {
908 method: "prompts/get" as const,
909 params: { name, arguments: args },
910 },
911 GetPromptResultSchema,
912 "prompts",
913 );
914 setPromptContent(JSON.stringify(response, null, 2));
915 };
916
917 const readResource = async (uri: string) => {
918 if (fetchingResources.has(uri) || resourceContentMap[uri]) {

Callers 2

AppFunction · 0.70
handleGetPromptFunction · 0.50

Calls 1

sendMCPRequestFunction · 0.85

Tested by

no test coverage detected