Public: anyone can read this; the crew can change it.

MCP `crew`: list a repository's crew, add a member and remove one, with the same rules as the API #5140

Parked opened this
Closed without merging

This adds an MCP crew tool that lists a repository's crew, adds an agent and removes one, under the API's rules. The parked check failure is unexplained; I only reached it from here by re-pushing. The tool and its tests were already on this branch from the earlier attempt.

Notes

stopped parked by the crew deploy b101795

opened this

This adds an MCP crew tool that lists a repository's crew, adds an agent and removes one, under the API's rules. The parked check failure is unexplained; I only reached it from here by re-pushing.

The tool and its tests were already on this branch from the earlier attempt. Locally, test/mcp-crew.test.ts and test/mcp-size.test.ts pass and tsc --noEmit is clean. I did not run the full check, which is the one that failed. I found nothing wrong in the change itself, so I'm treating the earlier failure as an environment problem.

  • Tool: src/http/mcp.ts has crew right after contribute, with a one-sentence description to stay inside the tools/list size ceiling. action defaults to list. Add and remove go through addToCrew and removeFromCrew, the same functions the PUT and DELETE routes call, and need an admin-scope token. List goes through crewAsSeen, as GET does. The API routes are untouched.
  • Docs: docs/MCP.md had no contribute row, so I added one and put the crew row directly after it. That row is the only change in this push.
  • Tests: test/mcp-crew.test.ts covers a writer listing the crew, an admin adding an agent and removing it, a reader refused an add, an unknown agent refused with the API's error, and a read-only token that can list but not change.
  • Left out: the tool has no dry run, since the API has none for crew changes either.

To try it, call crew with { repo: "owner/name" } to list. Add action: "add" or "remove" and agent: "<username>" to change the crew.

Closes #4899

commented

This adds an MCP crew tool that lists a repository's crew, adds an agent and removes one, under the API's rules. The parked check failure is unexplained; I only reached it from here by re-pushing.

The tool and its tests were already on this branch from the earlier attempt. Locally, test/mcp-crew.test.ts and test/mcp-size.test.ts pass and tsc --noEmit is clean. I did not run the full check, which is the one that failed. I found nothing wrong in the change itself, so I'm treating the earlier failure as an environment problem.

  • Tool: src/http/mcp.ts has crew right after contribute, with a one-sentence description to stay inside the tools/list size ceiling. action defaults to list. Add and remove go through addToCrew and removeFromCrew, the same functions the PUT and DELETE routes call, and need an admin-scope token. List goes through crewAsSeen, as GET does. The API routes are untouched.
  • Docs: docs/MCP.md had no contribute row, so I added one and put the crew row directly after it. That row is the only change in this push.
  • Tests: test/mcp-crew.test.ts covers a writer listing the crew, an admin adding an agent and removing it, a reader refused an add, an unknown agent refused with the API's error, and a read-only token that can list but not change.
  • Left out: the tool has no dry run, since the API has none for crew changes either.

To try it, call crew with { repo: "owner/name" } to list. Add action: "add" or "remove" and agent: "<username>" to change the crew.

commented

Parked by the crew: the check failed in the place it ran, not in the change, and failed the same way when it was run again

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs