@@ -275,7 +275,7 @@ const App = () => {
275
275
setErrors ( ( prev ) => ( { ...prev , [ tabKey ] : null } ) ) ;
276
276
} ;
277
277
278
- const makeConnectionRequest = async < T extends z . ZodType > (
278
+ const sendMCPRequest = async < T extends z . ZodType > (
279
279
request : ClientRequest ,
280
280
schema : T ,
281
281
tabKey ?: keyof typeof errors ,
@@ -299,7 +299,7 @@ const App = () => {
299
299
} ;
300
300
301
301
const listResources = async ( ) => {
302
- const response = await makeConnectionRequest (
302
+ const response = await sendMCPRequest (
303
303
{
304
304
method : "resources/list" as const ,
305
305
params : nextResourceCursor ? { cursor : nextResourceCursor } : { } ,
@@ -312,7 +312,7 @@ const App = () => {
312
312
} ;
313
313
314
314
const listResourceTemplates = async ( ) => {
315
- const response = await makeConnectionRequest (
315
+ const response = await sendMCPRequest (
316
316
{
317
317
method : "resources/templates/list" as const ,
318
318
params : nextResourceTemplateCursor
@@ -329,7 +329,7 @@ const App = () => {
329
329
} ;
330
330
331
331
const readResource = async ( uri : string ) => {
332
- const response = await makeConnectionRequest (
332
+ const response = await sendMCPRequest (
333
333
{
334
334
method : "resources/read" as const ,
335
335
params : { uri } ,
@@ -342,7 +342,7 @@ const App = () => {
342
342
343
343
const subscribeToResource = async ( uri : string ) => {
344
344
if ( ! resourceSubscriptions . has ( uri ) ) {
345
- await makeConnectionRequest (
345
+ await sendMCPRequest (
346
346
{
347
347
method : "resources/subscribe" as const ,
348
348
params : { uri } ,
@@ -358,7 +358,7 @@ const App = () => {
358
358
359
359
const unsubscribeFromResource = async ( uri : string ) => {
360
360
if ( resourceSubscriptions . has ( uri ) ) {
361
- await makeConnectionRequest (
361
+ await sendMCPRequest (
362
362
{
363
363
method : "resources/unsubscribe" as const ,
364
364
params : { uri } ,
@@ -373,7 +373,7 @@ const App = () => {
373
373
} ;
374
374
375
375
const listPrompts = async ( ) => {
376
- const response = await makeConnectionRequest (
376
+ const response = await sendMCPRequest (
377
377
{
378
378
method : "prompts/list" as const ,
379
379
params : nextPromptCursor ? { cursor : nextPromptCursor } : { } ,
@@ -386,7 +386,7 @@ const App = () => {
386
386
} ;
387
387
388
388
const getPrompt = async ( name : string , args : Record < string , string > = { } ) => {
389
- const response = await makeConnectionRequest (
389
+ const response = await sendMCPRequest (
390
390
{
391
391
method : "prompts/get" as const ,
392
392
params : { name, arguments : args } ,
@@ -398,7 +398,7 @@ const App = () => {
398
398
} ;
399
399
400
400
const listTools = async ( ) => {
401
- const response = await makeConnectionRequest (
401
+ const response = await sendMCPRequest (
402
402
{
403
403
method : "tools/list" as const ,
404
404
params : nextToolCursor ? { cursor : nextToolCursor } : { } ,
@@ -412,7 +412,7 @@ const App = () => {
412
412
413
413
const callTool = async ( name : string , params : Record < string , unknown > ) => {
414
414
try {
415
- const response = await makeConnectionRequest (
415
+ const response = await sendMCPRequest (
416
416
{
417
417
method : "tools/call" as const ,
418
418
params : {
@@ -446,7 +446,7 @@ const App = () => {
446
446
} ;
447
447
448
448
const sendLogLevelRequest = async ( level : LoggingLevel ) => {
449
- await makeConnectionRequest (
449
+ await sendMCPRequest (
450
450
{
451
451
method : "logging/setLevel" as const ,
452
452
params : { level } ,
@@ -664,7 +664,7 @@ const App = () => {
664
664
< ConsoleTab />
665
665
< PingTab
666
666
onPingClick = { ( ) => {
667
- void makeConnectionRequest (
667
+ void sendMCPRequest (
668
668
{
669
669
method : "ping" as const ,
670
670
} ,
0 commit comments