Commit Graph

15 Commits

Author SHA1 Message Date
github-actions[bot]
a5108c96b4 fix: handle ToolError exceptions in MCP clients to reduce production alerts (#8599)
Add ToolError to exception handling alongside McpError in MCP client classes.
ToolError is raised by fastmcp for input validation errors (e.g., missing
required properties like 'filename'). Both error types are expected user-facing
errors from external MCP servers and should be logged at warning/debug level
to avoid triggering production alerts.

Fixes issue with production error: "fastmcp.exceptions.ToolError: Input
validation error: 'filename' is a required property"

🤖 Generated with [Letta Code](https://letta.com)

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: Letta <noreply@letta.com>
Co-authored-by: datadog-official[bot] <datadog-official[bot]@users.noreply.github.com>
Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
2026-01-19 15:54:38 -08:00
github-actions[bot]
f67af1b13d fix: Handle ExceptionGroup errors in MCP client cleanup (#8561)
The MCP library internally uses TaskGroup for async operations, which can
raise ExceptionGroup when cleanup fails. This was causing unhandled errors
to propagate in production.

Changes:
- Update cleanup() method in AsyncBaseMCPClient to catch ExceptionGroup
  using except* syntax and log errors at debug level (best-effort cleanup)
- Remove redundant try/except blocks in mcp_manager.py and
  mcp_server_manager.py that incorrectly re-raised cleanup exceptions

Fixes #8560

🐾 Generated with [Letta Code](https://letta.com)

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: Letta <noreply@letta.com>
Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
2026-01-19 15:54:38 -08:00
github-actions[bot]
adbc47ddc9 fix: downgrade McpError logging from warning to debug level (#8371)
MCP errors from external servers (e.g., "The specified key does not exist")
are user-facing issues, not system errors. Downgrading the log level from
warning to debug prevents these expected failures from triggering production
alerts in Datadog/Sentry.

Fixes #8370

🤖 Generated with [Letta Code](https://letta.com)

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: datadog-official[bot] <datadog-official[bot]@users.noreply.github.com>
Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
2026-01-12 10:57:48 -08:00
Kian Jones
193c4f7c4a chore: continued logging cleanup and bugfixes (#5882)
* gracefully handle mcp error, runs/temporal error, and otel exporter bug fixes

* move error handling to managers

* remove migrated error handling from routers

* move logger.error calls to logger.warnings
2025-11-13 15:36:20 -08:00
Kian Jones
161c70f11c chore: add logger calls instead of prints (#5720)
add logger calls instead of prints
2025-10-24 15:14:21 -07:00
Kian Jones
ca6cfa5914 chore: migrate to ruff (#4305)
* base requirements

* autofix

* Configure ruff for Python linting and formatting

- Set up minimal ruff configuration with basic checks (E, W, F, I)
- Add temporary ignores for common issues during migration
- Configure pre-commit hooks to use ruff with pass_filenames
- This enables gradual migration from black to ruff

* Delete sdj

* autofixed only

* migrate lint action

* more autofixed

* more fixes

* change precommit

* try changing the hook

* try this stuff
2025-08-29 11:11:19 -07:00
jnjpng
5d4509590e feat: add x-agent-id header for mcp tool execution
Co-authored-by: Jin Peng <jinjpeng@Jins-MacBook-Pro.local>
2025-08-22 14:09:03 -07:00
Charles Packer
4dcbf0b8f2 fix: patch mcp alerting on sentry 2025-08-11 10:26:42 -07:00
jnjpng
772a51777e feat: add support for oauth mcp
Co-authored-by: Jin Peng <jinjpeng@Jins-MacBook-Pro.local>
2025-07-24 18:23:01 -07:00
jnjpng
fe96b7001d feat: mcp custom headers and multiple fixes (#3079)
Co-authored-by: Jin Peng <jinjpeng@Jins-MacBook-Pro.local>
2025-07-03 00:06:21 +00:00
jnjpng
7315c133ef fix: test async context fix for mcp clients (#2880)
Co-authored-by: Jin Peng <jinjpeng@Jins-MacBook-Pro.local>
2025-06-18 16:52:58 +00:00
jnjpng
729acaedb2 feat: add token column to mcp_servers and pipe through to sse server config (#2775)
Co-authored-by: Jin Peng <jinjpeng@Jins-MacBook-Pro.local>
2025-06-14 18:48:10 -07:00
cthomas
1f94928957 fix: parse function response for async agent loop (#2411)
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2025-05-24 09:26:48 -07:00
Sarah Wooders
34df96bf2c feat: add MCP servers into a table and MCP tool execution to new agent loop (#2323)
Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
2025-05-23 16:22:16 -07:00
Matthew Zhou
4a9fc2003e feat: Add async MCP clients (#1882) 2025-04-24 11:29:19 -07:00