feat: add worker log retrieval to MCP server for job troubleshooting#999
Open
rickrams wants to merge 2 commits intoaws-deadline:mainlinefrom
Open
feat: add worker log retrieval to MCP server for job troubleshooting#999rickrams wants to merge 2 commits intoaws-deadline:mainlinefrom
rickrams wants to merge 2 commits intoaws-deadline:mainlinefrom
Conversation
leongdl
reviewed
Feb 14, 2026
|
|
||
| ``` | ||
| src/deadline/mcp/ | ||
| src/deadline/_mcp/ |
leongdl
approved these changes
Feb 14, 2026
Add ability to retrieve worker logs via the MCP server, enabling a
complete job troubleshooting workflow from job -> session -> worker logs.
Changes:
API layer (deadline.client.api):
- Add get_worker_logs() function to retrieve CloudWatch logs for a worker
- Add WorkerLogResult dataclass
- Uses AssumeFleetRoleForRead for Deadline Cloud Monitor credential users,
mirroring how get_session_logs uses AssumeQueueRoleForUser
MCP tool layer (deadline._mcp):
- Add get_session_and_worker_logs MCP tool that takes a session_id and
automatically fetches session details, session logs, AND the correct
worker logs in one call. This prevents worker/session ID mismatches
when an AI agent is troubleshooting jobs with multiple sessions.
- get_worker_logs is NOT registered as a standalone MCP tool — it is a
public Python API that the combined tool calls internally.
- get_session_logs remains available as a standalone MCP tool for users
who have queue permissions but not fleet permissions.
- Update MCP server instructions to guide AI agents to check worker logs
for infrastructure issues (spot interruptions, OOM, agent crashes).
Worker logs are stored at /aws/deadline/{farm_id}/{fleet_id}/{worker_id}
and contain worker agent operations, environment setup, and system events
not visible in session logs.
Signed-off-by: rickrams <rickrams@users.noreply.github.com>
f496dd8 to
1b73b99
Compare
Contributor
|
By the way, this change is still in draft, so no one is reviewing it. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Add ability to retrieve worker logs via the MCP server, enabling a complete job troubleshooting workflow from job -> session -> worker logs.
Changes:
API layer (deadline.client.api):
MCP tool layer (deadline._mcp):
Worker logs are stored at /aws/deadline/{farm_id}/{fleet_id}/{worker_id} and contain worker agent operations, environment setup, and system events not visible in session logs.
How was this change tested?
See DEVELOPMENT.md for information on running tests.
downloadorasset_syncmodules? N/AWas this change documented?
Does this PR introduce new dependencies?
This library is designed to be integrated into third-party applications that have bespoke and customized deployment environments. Adding dependencies will increase the chance of library version conflicts and incompatabilities. Please evaluate the addition of new dependencies. See the Dependencies section of DEVELOPMENT.md for more details.
Is this a breaking change? No
Does this change impact security? No
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.