feat:节点合并
This commit is contained in:
@@ -46,6 +46,20 @@ def _require_catalog() -> ComponentCatalog:
|
||||
return _catalog
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
async def get_component_materials(
|
||||
component_types: Annotated[
|
||||
list[ComponentType],
|
||||
Field(description="要使用的物料类型,可一次传多个", min_length=1),
|
||||
],
|
||||
) -> dict[str, Any]:
|
||||
"""获取物料的完整默认配置(schema)和使用说明
|
||||
|
||||
新增组件前先查看所选类型的默认配置,只覆盖需要修改的字段,不从零编写 props
|
||||
"""
|
||||
return material_fields.get_materials(_require_catalog(), component_types)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
async def list_field_groups(component_type: ComponentType) -> dict[str, Any]:
|
||||
"""列出物料的字段分组:每组管什么、包含哪些字段名称
|
||||
|
||||
Reference in New Issue
Block a user