mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-16 17:36:07 +00:00
feat(mcp): support mcp resources (#2215)
* feat(mcp): support mcp resources * feat(web): split MCP resources into tab * docs: add MCP resources PR review * feat(mcp): productionize resource support * feat(mcp): scope local agent tools and resources * fix(web): gate space embedding models behind login * fix(web): prevent clipped space model CTA * test: update preproc resource tool expectations * fix(web): expose skill authoring tools in selector --------- Co-authored-by: yang.xiang <yang.xiang@advancegroup.com> Co-authored-by: Hyu <chenhyu@proton.me> Co-authored-by: Junyan Qin <rockchinq@gmail.com>
This commit is contained in:
@@ -563,6 +563,11 @@ export interface MCPServerRuntimeInfo {
|
||||
* server runs inside Box. Absent when Box is unavailable. */
|
||||
box_session_id?: string;
|
||||
box_enabled?: boolean;
|
||||
resource_count: number;
|
||||
resources: MCPResource[];
|
||||
resource_template_count?: number;
|
||||
resource_templates?: MCPResourceTemplate[];
|
||||
resource_capabilities?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export type MCPServer =
|
||||
@@ -617,11 +622,67 @@ export interface MCPTool {
|
||||
parameters?: object;
|
||||
}
|
||||
|
||||
export interface MCPResource {
|
||||
uri: string;
|
||||
name: string;
|
||||
title?: string;
|
||||
description: string;
|
||||
mime_type: string;
|
||||
size?: number;
|
||||
icons?: object[];
|
||||
annotations?: Record<string, unknown>;
|
||||
_meta?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface MCPResourceTemplate {
|
||||
uri_template: string;
|
||||
name: string;
|
||||
title?: string;
|
||||
description: string;
|
||||
mime_type: string;
|
||||
icons?: object[];
|
||||
annotations?: Record<string, unknown>;
|
||||
_meta?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface MCPResourceContent {
|
||||
uri: string;
|
||||
mime_type: string;
|
||||
type: 'text' | 'blob';
|
||||
text?: string;
|
||||
blob?: string | null;
|
||||
bytes?: number;
|
||||
truncated?: boolean;
|
||||
binary_omitted?: boolean;
|
||||
_meta?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface ApiRespMCPResources {
|
||||
resources: MCPResource[];
|
||||
resource_templates?: MCPResourceTemplate[];
|
||||
resource_capabilities?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface ApiRespMCPResourceContents {
|
||||
contents: MCPResourceContent[];
|
||||
server_name?: string;
|
||||
server_uuid?: string;
|
||||
uri?: string;
|
||||
source?: string;
|
||||
bytes?: number;
|
||||
truncated?: boolean;
|
||||
cache_hit?: boolean;
|
||||
warnings?: string[];
|
||||
}
|
||||
|
||||
export interface PluginTool {
|
||||
name: string;
|
||||
description: string;
|
||||
human_desc: string;
|
||||
parameters: object;
|
||||
source?: 'builtin' | 'plugin' | 'mcp' | 'skill';
|
||||
source_name?: string;
|
||||
source_id?: string;
|
||||
}
|
||||
|
||||
export interface ApiRespTools {
|
||||
|
||||
Reference in New Issue
Block a user