About contract-cli-mdm-fields
This skill documents how to query MDM field configuration with contract-cli before writing vendor or legal entity data. It requires a business line and explains the different user and bot endpoints and support limits.
Key features
- 01Query field configuration by business line
- 02Cover vendor and legal entity fields
- 03Distinguish user and bot endpoints
- 04Note identity limits for risk fields
- 05No local validation or field conversion
Use cases
- 01Check field definitions before writing a vendor
- 02Review field configuration before writing a legal entity
- 03Query vendor risk fields through the user path
MCP support
Guides MDM field configuration queries through contract-cli; the user path uses contract MCP endpoints, while the bot path uses MDM endpoints.
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ qfeius/ contract-cli --skill contract-cli-mdm-fieldsAfter installing, type/contract-cli-mdm-fieldsin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlreferences/commands.mdschema-biz-lines.mdschema-fields-guide.mdDetails
From the project READMEcontract-cli MDM Fields
CRITICAL — 开始前 MUST 先读取 ../contract-cli-shared/SKILL.md。
适用命令
contract-cli mdm fields list --biz-line <vendor|legal_entity|vendor_risk>
快速决策
- 需要在写入交易方前确认字段定义:
--biz-line vendor - 需要在写入法人实体前确认字段定义:
--biz-line legal_entity - 需要确认交易方风险字段:
--biz-line vendor_risk,仅适用于 user/MCP 路径 - 如果用户想查合同创建枚举,不要走这里,改用
contract enum list
关键规则
--biz-line必填mdm fields list --as user走/open-apis/contract/v1/mcp/config/config_listmdm fields list --as bot走/open-apis/mdm/v1/config/config_list- bot 后端当前只接受
vendor/legalEntity;CLI 会把 bot 下的legal_entity自动映射为legalEntity vendor_risk在 bot 身份下不支持,会在本地报错--user-id-type/--user-id仍按共享规则透传,不做本地校验- 当前只封装字段配置查询,不负责本地校验和字段转换
- 推荐阅读顺序是:
- 先读 references/schema-fields-guide.md 选业务线和查询场景
- 再读 references/schema-biz-lines.md 查
--biz-line精确值 - 最后读 references/commands.md 抄命令示例
实现来源
- internal/cli/schema_command.go
- internal/openplatform/schema/service.go
- references/schema-fields-guide.md
- references/schema-biz-lines.md
- references/commands.md
操作建议
- 未封装写接口前,先用这条命令确认字段结构
- 需要写交易方或法人实体时,等待对应结构化写命令开放;不要退回
api call,该入口当前暂未开放 - 只想查合同枚举时,不要走这里
不要这样做
- 不要把
mdm fields list当成数据查询命令 - 不要假设它会自动帮你校验写请求
Comments
Markdown supported