diff --git a/src/apis/paths/mcp.ts b/src/apis/paths/mcp.ts index 8ec77b0da9ed4de2f533b03b32d91b62cef0be5b..8906fe9ba65116dd32b57c8c3052d419249ab250 100644 --- a/src/apis/paths/mcp.ts +++ b/src/apis/paths/mcp.ts @@ -37,18 +37,26 @@ const getMcpServiceDetail = (id: string) => { data: string; mcpType: 'stdio' | 'sse' | 'stream'; tools: { + id: string; name: string; description: string; - input_args: { - name: string; - description: string; - type: string; - }[]; - output_args: { - name: string; - description: string; - type: string; - }[]; + mcp_id: string; + input_schema: { + properties: { + [key: string]: { + description: string; + type: string; + }; + }; + }; + output_schema: { + properties: { + [key: string]: { + description: string; + type: string; + }; + }; + }; }[]; }>(`${MCP_BASE_URL}/${id}`); }; diff --git a/src/views/api/components/McpServiceDetail.vue b/src/views/api/components/McpServiceDetail.vue index c55b0494b63b161d0f5a21ab16edaf68f0948b4f..94f35bdd86a4620e1853d89f66c5b2d7dbb2f215 100644 --- a/src/views/api/components/McpServiceDetail.vue +++ b/src/views/api/components/McpServiceDetail.vue @@ -14,18 +14,26 @@ interface McpDetail { data: string; mcpType: string; tools: { + id: string; name: string; description: string; - input_args: { - name: string; - description: string; - type: string; - }[]; - output_args: { - name: string; - description: string; - type: string; - }[]; + mcp_id: string; + input_schema: { + properties: { + [key: string]: { + description: string; + type: string; + }; + }; + }; + output_schema: { + properties: { + [key: string]: { + description: string; + type: string; + }; + }; + }; }[]; } @@ -48,6 +56,13 @@ async function getMcpServiceDetail(serviceId: string) { const [_, res] = await api.getMcpServiceDetail(serviceId); if (res) { mcpServiceDetail.value = res.result; + // mcpServiceDetail.value.tools.forEach((tool) => { + // tool.input_schema.properties = [] + // for (const key in tool.input_schema.properties) { + // tooo + // } + // }) + // console.log(mcpServiceDetail.value); } } @@ -96,17 +111,20 @@ watch( {{ tool.description }} - +
- {{ args.name }} + {{ key }} {{ args.type }}
@@ -114,18 +132,22 @@ watch(
- +
- {{ args.name }} + {{ key }} {{ args.type }}