Skip to content

feat(mcp,cli): phase inventory tools and CLI parity#282

Merged
adriannoes merged 5 commits into
feat/card-phase-erg/2-sdk-phase-and-pipefrom
feat/card-phase-erg/3-mcp-cli-phase-inventory
Jun 11, 2026
Merged

feat(mcp,cli): phase inventory tools and CLI parity#282
adriannoes merged 5 commits into
feat/card-phase-erg/2-sdk-phase-and-pipefrom
feat/card-phase-erg/3-mcp-cli-phase-inventory

Conversation

@adriannoes

@adriannoes adriannoes commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Analytics pipe seeding (306996636) required execute_graphql for phase inventory and phase-local creates. Spec: .cursor/dev-planning/specs/archive/card-phase-ergonomics/Stack after #277 (closed).

Depends on: #281


Objective

Expose SDK phase reads on MCP + CLI so agents can audit/move without GraphQL:

  • MCP: get_phase_cards, get_phase_cards_count, get_phase_allowed_move_targets
  • CLI: pipefy phase cards, cards-count, allowed-moves
  • Clamp phase cards --first to 1–500 (F5)
  • MCP create_label / update_label hex via planner (needs PR1)

Improvements

  • Discover allowed move targets before move_card_to_phase fails.
  • Count/list cards in one phase without pipe-wide get_cards title search.

@adriannoes adriannoes added the enhancement New feature or request label Jun 3, 2026
@adriannoes adriannoes self-assigned this Jun 3, 2026
adriannoes added a commit that referenced this pull request Jun 9, 2026
Align PR #282 with SDK review on #281: call client.get_phase instead of
get_phase_cards_count_payload; document start-form phase id via
startFormPhaseId, not start_form_phase.
@adriannoes adriannoes force-pushed the feat/card-phase-erg/3-mcp-cli-phase-inventory branch from d3deee2 to a5f7517 Compare June 9, 2026 21:36

@gbrlcustodio gbrlcustodio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Two CLI naming notes on the new phase commands.

Comment thread packages/cli/src/pipefy_cli/commands/phase.py Outdated
Comment thread packages/cli/src/pipefy_cli/commands/phase.py Outdated

@gbrlcustodio gbrlcustodio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One blocker (test fails to collect on this PR in isolation) and one duplication nit.

Comment thread packages/mcp/tests/tools/test_pipe_tool_helpers.py Outdated
Comment thread packages/cli/src/pipefy_cli/commands/_common.py Outdated
Add get_phase_cards, get_phase_cards_count, get_phase_allowed_move_targets;
phase cards/cards-count/allowed-moves CLI commands; clamp --first to 1-500;
label hex validation on create_label/update_label via shared planner.
Align PR #282 with SDK review on #281: call client.get_phase instead of
get_phase_cards_count_payload; document start-form phase id via
startFormPhaseId, not start_form_phase.
Move _merge_phase_and_start_form_field_values coverage to the create-card
PR where the helper lands. Rename CLI commands to phase count and phase
targets per review (action verb and returned entity naming).
@adriannoes adriannoes force-pushed the feat/card-phase-erg/3-mcp-cli-phase-inventory branch from a5f7517 to d096020 Compare June 10, 2026 15:30
@adriannoes

Copy link
Copy Markdown
Collaborator Author

Thanks @gbrlcustodio — addressed in d096020: moved the _merge_phase_and_start_form_field_values test to #283 (fixes collection on this PR in isolation). Renamed CLI to pipefy phase count and pipefy phase targets.

Comment thread packages/mcp/src/pipefy_mcp/tools/pipe_config_tools.py
Comment thread packages/cli/src/pipefy_cli/commands/_common.py Outdated
Comment thread packages/mcp/src/pipefy_mcp/tools/pipe_config_tools.py Outdated
Comment thread packages/mcp/src/pipefy_mcp/tools/registry.py Outdated
Comment thread packages/mcp/src/pipefy_mcp/tools/pipe_config_tools.py Outdated
Map get_phase not-found ValueErrors to NOT_FOUND in MCP and CLI phase count;
dedupe cards page-size validation via shared helper; fix docstrings and registry comment.
@adriannoes adriannoes merged commit 2982b07 into feat/card-phase-erg/2-sdk-phase-and-pipe Jun 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants