CRITICAL — before starting, MUST first read ../auth/SKILL.md, to confirm the current profile, user login state, and bot/token constraints.
Quick decision
- Contract search, detail, create, contract text, template, category, enumeration: read ../contract-cli-contract/SKILL.md The structure here is now "main document + field tree appendix + enumeration appendix"
- Counterparty query: read ../contract-cli-mdm-vendor/SKILL.md The structure here is now "main guide + parameter appendix + command examples"
- Legal entity query: read ../contract-cli-mdm-legal/SKILL.md The structure here is now "main guide + parameter appendix + command examples"
- Field configuration query: read ../contract-cli-mdm-fields/SKILL.md The structure here is now "main guide + biz-line appendix + command examples"
- The user gave an exact open platform path, or the structured command does not yet cover it: do not recommend
api call; it is a reserved capability and is currently not yet open for use
Currently implemented modules
contract get/search/create/sync-user-groups/textcontract upload-filecontract category listcontract template list/get/instantiatecontract enum listmdm vendor list/getmdm legal list/getmdm fields list
Shared constraints
api callis currently not open to the public; executingcontract-cli api ...will directly returnapi call 暂未开放使用,请使用已开放的结构化命令contract/v1/mcpMost of these paths only support--as user- Among the current structured commands, only
contract get、contract search、contract create、contract sync-user-groups、contract text、contract category list、contract template list、contract template get、contract template instantiate、contract upload-file、mdm vendor list、mdm vendor get、mdm legal list、mdm legal get、mdm fields listsupports bot; among them, the contract commands' bot route goes through/open-apis/contract/v1/...,contract upload-filegoes through/open-apis/contract/v1/files/uploadand only supports bot,mdm vendor list/get's bot route goes through/open-apis/mdm/v1/vendors...,mdm legal list's bot route goes through/open-apis/mdm/v1/legal_entities/list_all,mdm legal get's bot route goes through/open-apis/mdm/v1/legal_entities/{legal_entity_id},mdm fields list's bot route goes through/open-apis/mdm/v1/config/config_list - If it matches
/open-apis/contract/v1/mcp/and --as is not passed--as, the CLI will by default parse asuserand ignoredefault_identity - These commands do not expose
--operator - Request body file input uniformly uses
--input-file --user-id-type/--user-idis a general open platform query parameter: supported by structured commands;--user-id-typeWhen not passed, by default appenduser_id_type=user_id, explicitly passing a value will override the default value;--user-idIf passed, it is passed through; if not passed, it is not included; no command-level validation is done--fileis now only used for real binary file uploads, for examplecontract upload-file- JSON request body file input always uses
--input-file, do not treat--fileas a JSON request body parameter - For default output, it is recommended to use
json; when troubleshooting is needed, you can add--raw
Implementation source
Troubleshooting points
- Command reports
only supports --as user: what is currently matched is a user-onlycontract/v1/mcppath, switch to--as user - Command reports
profile "<name>" not found: first executecontract-cli config add --env dev --name <profile> - Command reports
user identity is not authorized: first executecontract-cli auth login --profile <profile> --as user - The user wants to do file upload: currently only supported
contract upload-file --as bot --file <path> --file-type <type>