LibreChat/packages/api/src/mcp
Danny Avila 7829fa9eca
🪄 refactor: Simplify MCP Tool Content Formatting to Unified String Output (#12352)
* refactor: Simplify content formatting in MCP service and parser

- Consolidated content handling in `formatToolContent` to return a plain-text string instead of an array for all providers, enhancing clarity and consistency.
- Removed unnecessary checks for content array providers, streamlining the logic for handling text and image artifacts.
- Updated related tests to reflect changes in expected output format, ensuring comprehensive coverage for the new implementation.

* fix: Return empty string for image-only tool responses instead of '(No response)'

When artifacts exist (images/UI resources) but no text content is present,
return an empty string rather than the misleading '(No response)' fallback.
Adds missing test assertions for image-only content and standardizes
length checks to explicit `> 0` comparisons.
2026-03-21 14:28:56 -04:00
..
__tests__ 🪄 refactor: Simplify MCP Tool Content Formatting to Unified String Output (#12352) 2026-03-21 14:28:56 -04:00
oauth 🪝 fix: MCP Refresh token on OAuth Discovery Failure (#12266) 2026-03-16 09:31:01 -04:00
registry 📦 refactor: Consolidate DB models, encapsulating Mongoose usage in data-schemas (#11830) 2026-03-21 14:28:53 -04:00
types 🪄 refactor: Simplify MCP Tool Content Formatting to Unified String Output (#12352) 2026-03-21 14:28:56 -04:00
auth.ts 🚦 feat: Auto-reinitialize MCP Servers on Request (#9226) 2025-08-23 03:27:05 -04:00
connection.ts 🛂 fix: MCP OAuth Race Conditions, CSRF Fallback, and Token Expiry Handling (#12171) 2026-03-10 21:15:01 -04:00
ConnectionsRepository.ts 🗝️ fix: Exempt Admin-Trusted Domains from MCP OAuth Validation (#12255) 2026-03-15 23:03:12 -04:00
enum.ts 🧬 refactor: Optimize MCP Tool Queries with Server-Centric Architecture 2025-09-21 20:40:14 -04:00
errors.ts 🔒 feat: Add MCP server domain restrictions for remote transports (#11013) 2025-12-18 13:57:49 -05:00
mcpConfig.ts 🛂 fix: MCP OAuth Race Conditions, CSRF Fallback, and Token Expiry Handling (#12171) 2026-03-10 21:15:01 -04:00
MCPConnectionFactory.ts 🔑 fix: Type-Safe User Context Forwarding for Non-OAuth Tool Discovery (#12348) 2026-03-21 12:46:23 -04:00
MCPManager.ts 🔑 fix: Type-Safe User Context Forwarding for Non-OAuth Tool Discovery (#12348) 2026-03-21 12:46:23 -04:00
parsers.ts 🪄 refactor: Simplify MCP Tool Content Formatting to Unified String Output (#12352) 2026-03-21 14:28:56 -04:00
UserConnectionManager.ts 🗝️ fix: Exempt Admin-Trusted Domains from MCP OAuth Validation (#12255) 2026-03-15 23:03:12 -04:00
utils.ts 💁 refactor: Better Config UX for MCP STDIO with customUserVars (#12226) 2026-03-14 21:22:25 -04:00
zod.ts 🎛️ fix: Google JSON Schema Normalization/Resolution Logic (#11804) 2026-02-15 21:31:16 -05:00