CRITICAL — before starting, MUST first read ../contract-cli-shared/SKILL.md。
Applicable commands
contract-cli api call <METHOD> <PATH>
Quick decision
- Covered by structured commands: prefer the corresponding skill; do not fall back to
api call - User provided an exact open platform path or the structured command is not implemented: use
api call - User wants to call
/open-apis/contract/v1/mcp/...: must use--as user
Key rules
PATHmust be a relative path and start with/open-apis/opening- Request body file input uses
--input-file --input-fileand--dataare mutually exclusive- Can be used repeatedly
--header "Key: Value" - When matching
/open-apis/contract/v1/mcp/:--as botwill be rejected outright- When not passing
--as, resolve by default asuseridentity
- Recommended reading order:
- First read references/api-call-guide.md to determine whether to fall back to
api call - Then read references/api-call-rules.md to check path, identity, and request body rules
- Finally read references/commands.md to copy command examples
- First read references/api-call-guide.md to determine whether to fall back to
Implementation source
- internal/cli/api_command.go
- internal/cli/command_support.go
- internal/openplatform/client.go
- references/api-call-guide.md
- references/api-call-rules.md
- references/commands.md
Operational advice
- When structured commands exist, prefer structured commands
- For raw debugging requests, prefer
--input-file - When matching
contract/v1/mcp, default to thinking in terms ofuserwhen looking at the problem
Do not do this
- Do not pass an absolute URL
- Do not treat
--fileas request body input - Do not disguise a real file upload requirement as an ordinary JSON body call