mcp example, mock i/o for client-to-server communications

This commit is contained in:
Danny Avila 2025-06-26 13:33:59 -04:00
parent 799f0e5810
commit 7251308244
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
9 changed files with 343 additions and 22 deletions

View file

@ -312,6 +312,30 @@ export const getToolCalls = (params: q.GetToolCallParams): Promise<q.ToolCallRes
);
};
export const createTool = (toolData: {
name: string;
description: string;
type: 'function' | 'code_interpreter' | 'file_search';
metadata?: Record<string, unknown>;
}): Promise<{
id: string;
type: string;
function: {
name: string;
description: string;
};
metadata: Record<string, unknown>;
created_at: string;
updated_at: string;
}> => {
return request.post(
endpoints.agents({
path: 'tools/add',
}),
toolData,
);
};
/* Files */
export const getFiles = (): Promise<f.TFile[]> => {

View file

@ -48,6 +48,7 @@ export enum QueryKeys {
banner = 'banner',
/* Memories */
memories = 'memories',
mcpTools = 'mcpTools',
}
export enum MutationKeys {