Skip to content

feat: add everyrow_list_session_tasks MCP tool#243

Merged
nikosbosse merged 5 commits intomainfrom
feat/list-session-tasks-mcp-tool
Feb 27, 2026
Merged

feat: add everyrow_list_session_tasks MCP tool#243
nikosbosse merged 5 commits intomainfrom
feat/list-session-tasks-mcp-tool

Conversation

@nikosbosse
Copy link
Contributor

Summary

  • Adds everyrow_list_session_tasks MCP tool that calls GET /api/v0/sessions/{id}/tasks to list task IDs, statuses, and types for a session
  • Adds ListSessionTasksInput model with session_id field
  • Used by the agent to look up task IDs so it can display previous results via mcp__display__show_task

Dependencies

  • Requires the engine endpoint from futuresearch/delphos#4472 (adds GET /api/v0/sessions/{id}/tasks)

Test plan

  • Verify the tool is listed in list_tools() output
  • Test with a valid session ID — returns task list with IDs, types, and statuses
  • Test with an invalid session ID — returns error message
  • E2E: agent calls list_session_tasks → gets task IDs → calls show_task → viz panel displays results

🤖 Generated with Claude Code

nikosbosse and others added 2 commits February 27, 2026 18:24
Calls GET /api/v0/sessions/{id}/tasks to list task IDs, statuses, and
types for a session. Used by the agent to look up tasks for displaying
previous results in the viz pane.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nikosbosse nikosbosse force-pushed the feat/list-session-tasks-mcp-tool branch from d045d19 to 4d9427b Compare February 27, 2026 17:26
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment on lines +1320 to +1321
f"- **{t['task_type']}** (task_id: {t['task_id']})\n"
f" Status: {t['status']} | Created: {t['created_at']}{artifact}"

This comment was marked as outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLAUDE: Not a real issue. These fields (task_id, task_type, status, created_at) are required columns in our tasks table — the API endpoint that serves this data is defined by us in the engine and will always include them. Adding .get() fallbacks for schema-guaranteed fields is unnecessary defensive programming.

The artifact_id uses .get() because it's genuinely nullable — tasks don't have an artifact until processing completes. That's a semantic distinction, not an inconsistency.

👎

@nikosbosse nikosbosse requested a review from RafaelPo February 27, 2026 17:35

lines = [f"Found {len(tasks)} task(s) in session {params.session_id}:\n"]
for t in tasks:
artifact = f" | artifact: {t['artifact_id']}" if t.get("artifact_id") else ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: is it implied this is the output artifact id?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — renamed to output_artifact in 2d5b208.

)
]

lines = [f"Found {len(tasks)} task(s) in session {params.session_id}:\n"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much work would it be to have the input artifact id(s) as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very doable — the input_artifacts and context_artifacts uuid[] columns already exist on the tasks table, and get_tasks_for_session() already fetches them. Just need to add two optional fields to SessionTaskItem and pass them through in the handler (~5 lines in the engine + MCP tool update). Will do as a follow-up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(That was Claude)

nikosbosse and others added 2 commits February 27, 2026 23:05
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nikosbosse nikosbosse merged commit 65cf128 into main Feb 27, 2026
5 checks passed
@nikosbosse nikosbosse deleted the feat/list-session-tasks-mcp-tool branch February 27, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants