Skip to content

fix: align MCP client with public API session contract#35

Merged
jeremyeder merged 1 commit intoambient-code:mainfrom
jeremyeder:fix/public-api-field-names
Mar 1, 2026
Merged

fix: align MCP client with public API session contract#35
jeremyeder merged 1 commit intoambient-code:mainfrom
jeremyeder:fix/public-api-field-names

Conversation

@jeremyeder
Copy link
Contributor

Summary

  • MCP client was sending initialPrompt but public API expects task, causing all session creation to fail with validation errors
  • Removed interactive and timeout parameters that the public API doesn't support
  • Fixed repo format: bare URL strings → {"url": "..."} objects to match the Repo DTO
  • Fixed clone_session and SESSION_TEMPLATES with the same corrections

Test plan

  • Verify acp_create_session tool creates sessions successfully
  • Verify acp_create_session_from_template works with all templates
  • Verify acp_clone_session copies session with correct field names
  • Verify repos are sent in [{"url": "..."}] format

🤖 Generated with Claude Code

The MCP client was sending field names that don't match the public API's
CreateSessionRequest DTO, causing session creation to fail with validation
errors. Also removes parameters the public API doesn't support.

- client.py: initialPrompt → task, llmConfig.model → model
- client.py: remove interactive/timeout params (not in public API)
- client.py: transform repos from bare strings to {url: str} objects
- client.py: fix clone_session to use same corrected field names
- client.py: update SESSION_TEMPLATES to use task/model fields
- server.py: remove interactive/timeout from tool schema and dispatch

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jeremyeder jeremyeder merged commit 051ee3b into ambient-code:main Mar 1, 2026
1 check failed
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.

1 participant