CRITICAL — Before starting, MUST first read ../contract-cli-shared/SKILL.md。
Applicable commands
contract-cli mdm legal listcontract-cli mdm legal get <legal-entity-id>
Quick decision
- Known legal entity ID: use
mdm legal get - Only know the name and need a candidate list: use
mdm legal list - If the user wants to query field configuration: switch to ../contract-cli-mdm-fields/SKILL.md
- If the user wants to create or update a legal entity: the current structured command does not implement this; do not fake it
Key rules
mdm legal listsupports--name、--page-size、--page-tokenmdm legal list --as usergoes through/open-apis/contract/v1/mcp/legal_entitiesmdm legal list --as botgoes through/open-apis/mdm/v1/legal_entities/list_allmdm legal get --as usergoes through/open-apis/contract/v1/mcp/legal_entities/{legal_entity_id}mdm legal get --as botgoes through/open-apis/mdm/v1/legal_entities/{legal_entity_id}, and additionally passes through querylegal_entity_id- does not expose
--operator --user-id-type/--user-idis still passed through according to shared rules, with no local validation- Recommended reading order is:
- First read references/entity-query-guide.md to choose the query scenario
- Then read references/entity-query-parameters.md to check the request parameter mapping
- Finally read references/commands.md to copy command examples
Implementation source
- internal/cli/vendor_command.go
- internal/openplatform/entity/service.go
- references/entity-query-guide.md
- references/entity-query-parameters.md
- references/commands.md
Operation suggestions
- When only the entity name is known, first
mdm legal listto get candidates, thenmdm legal getto query details - Before creating a contract, if you only need to select our entity, prioritize remembering the legal entity id
- When you want to confirm the field definitions of the write API, switch to
mdm fields list
Do not do this
- Do not treat
mdm legal list/getas a field configuration query - Do not treat the unimplemented
mdm legal create/updateas an existing structured command