Skip to content

Commit f716132

Browse files
rename
1 parent 6be05c5 commit f716132

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

client/src/App.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ const App = () => {
275275
setErrors((prev) => ({ ...prev, [tabKey]: null }));
276276
};
277277

278-
const makeConnectionRequest = async <T extends z.ZodType>(
278+
const sendMCPRequest = async <T extends z.ZodType>(
279279
request: ClientRequest,
280280
schema: T,
281281
tabKey?: keyof typeof errors,
@@ -299,7 +299,7 @@ const App = () => {
299299
};
300300

301301
const listResources = async () => {
302-
const response = await makeConnectionRequest(
302+
const response = await sendMCPRequest(
303303
{
304304
method: "resources/list" as const,
305305
params: nextResourceCursor ? { cursor: nextResourceCursor } : {},
@@ -312,7 +312,7 @@ const App = () => {
312312
};
313313

314314
const listResourceTemplates = async () => {
315-
const response = await makeConnectionRequest(
315+
const response = await sendMCPRequest(
316316
{
317317
method: "resources/templates/list" as const,
318318
params: nextResourceTemplateCursor
@@ -329,7 +329,7 @@ const App = () => {
329329
};
330330

331331
const readResource = async (uri: string) => {
332-
const response = await makeConnectionRequest(
332+
const response = await sendMCPRequest(
333333
{
334334
method: "resources/read" as const,
335335
params: { uri },
@@ -342,7 +342,7 @@ const App = () => {
342342

343343
const subscribeToResource = async (uri: string) => {
344344
if (!resourceSubscriptions.has(uri)) {
345-
await makeConnectionRequest(
345+
await sendMCPRequest(
346346
{
347347
method: "resources/subscribe" as const,
348348
params: { uri },
@@ -358,7 +358,7 @@ const App = () => {
358358

359359
const unsubscribeFromResource = async (uri: string) => {
360360
if (resourceSubscriptions.has(uri)) {
361-
await makeConnectionRequest(
361+
await sendMCPRequest(
362362
{
363363
method: "resources/unsubscribe" as const,
364364
params: { uri },
@@ -373,7 +373,7 @@ const App = () => {
373373
};
374374

375375
const listPrompts = async () => {
376-
const response = await makeConnectionRequest(
376+
const response = await sendMCPRequest(
377377
{
378378
method: "prompts/list" as const,
379379
params: nextPromptCursor ? { cursor: nextPromptCursor } : {},
@@ -386,7 +386,7 @@ const App = () => {
386386
};
387387

388388
const getPrompt = async (name: string, args: Record<string, string> = {}) => {
389-
const response = await makeConnectionRequest(
389+
const response = await sendMCPRequest(
390390
{
391391
method: "prompts/get" as const,
392392
params: { name, arguments: args },
@@ -398,7 +398,7 @@ const App = () => {
398398
};
399399

400400
const listTools = async () => {
401-
const response = await makeConnectionRequest(
401+
const response = await sendMCPRequest(
402402
{
403403
method: "tools/list" as const,
404404
params: nextToolCursor ? { cursor: nextToolCursor } : {},
@@ -412,7 +412,7 @@ const App = () => {
412412

413413
const callTool = async (name: string, params: Record<string, unknown>) => {
414414
try {
415-
const response = await makeConnectionRequest(
415+
const response = await sendMCPRequest(
416416
{
417417
method: "tools/call" as const,
418418
params: {
@@ -446,7 +446,7 @@ const App = () => {
446446
};
447447

448448
const sendLogLevelRequest = async (level: LoggingLevel) => {
449-
await makeConnectionRequest(
449+
await sendMCPRequest(
450450
{
451451
method: "logging/setLevel" as const,
452452
params: { level },
@@ -664,7 +664,7 @@ const App = () => {
664664
<ConsoleTab />
665665
<PingTab
666666
onPingClick={() => {
667-
void makeConnectionRequest(
667+
void sendMCPRequest(
668668
{
669669
method: "ping" as const,
670670
},

0 commit comments

Comments
 (0)