mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🧬 refactor: Optimize MCP Tool Queries with Server-Centric Architecture
🧬 refactor: Optimize MCP Tool Queries with Server-Centric Architecture
refactor: optimize mcp tool queries by removing redundancy, making server-centric structure, enabling query only when expected, minimize looping/transforming query data, eliminating unused/compute-heavy methods
ci: MCP Server Tools Mocking in Agent Tests
This commit is contained in:
parent
5b1a31ef4d
commit
f0599ad36c
19 changed files with 235 additions and 1104 deletions
|
|
@ -299,7 +299,7 @@ export const getAvailableTools = (
|
|||
|
||||
/* MCP Tools - Decoupled from regular tools */
|
||||
|
||||
export const getMCPTools = (): Promise<s.TPlugin[]> => {
|
||||
export const getMCPTools = (): Promise<q.MCPServersResponse> => {
|
||||
return request.get(endpoints.mcp.tools);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -101,6 +101,25 @@ export type AllPromptGroupsResponse = t.TPromptGroup[];
|
|||
|
||||
export type ConversationTagsResponse = s.TConversationTag[];
|
||||
|
||||
/* MCP Types */
|
||||
export type MCPTool = {
|
||||
name: string;
|
||||
pluginKey: string;
|
||||
description: string;
|
||||
};
|
||||
|
||||
export type MCPServer = {
|
||||
name: string;
|
||||
icon: string;
|
||||
authenticated: boolean;
|
||||
authConfig: s.TPluginAuthConfig[];
|
||||
tools: MCPTool[];
|
||||
};
|
||||
|
||||
export type MCPServersResponse = {
|
||||
servers: Record<string, MCPServer>;
|
||||
};
|
||||
|
||||
export type VerifyToolAuthParams = { toolId: string };
|
||||
export type VerifyToolAuthResponse = {
|
||||
authenticated: boolean;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue