get_entity_children
Retrieve child entities within a container entity in Synapse, such as datasets, projects, folders, files, or tables, by providing the container's entity ID.
Instructions
Get child entities of a container entity.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | Yes |
Implementation Reference
- src/synapse_mcp/tools.py:169-188 (handler)The main handler function implementing the get_entity_children tool. Validates the entity ID, retrieves the entity type, and fetches children using project or folder specific operations.def get_entity_children(entity_id: str, ctx: Context) -> List[Dict[str, Any]]: """List children for Synapse container entities (projects or folders).""" if not validate_synapse_id(entity_id): return [{"error": f"Invalid Synapse ID: {entity_id}"}] try: entity_ops = get_entity_operations(ctx) entity = entity_ops["base"].get_entity_by_id(entity_id) entity_type = entity.get("type", "").lower() if entity_type == "project": return entity_ops["project"].get_project_children(entity_id) if entity_type == "folder": return entity_ops["folder"].get_folder_children(entity_id) return [{"error": f"Entity {entity_id} is not a container entity"}] except ConnectionAuthError as exc: return [{"error": f"Authentication required: {exc}", "entity_id": entity_id}] except Exception as exc: # pragma: no cover - defensive path return [{"error": str(exc), "entity_id": entity_id}]
- src/synapse_mcp/tools.py:159-168 (schema)Defines the input/output schema and metadata for the tool via the @mcp.tool decorator, including title, description, and operational annotations.@mcp.tool( title="List Entity Children", description="List children for Synapse container entities (projects or folders).", annotations={ "readOnlyHint": True, "idempotentHint": True, "destructiveHint": False, "openWorldHint": True, }, )
- src/synapse_mcp/__init__.py:14-18 (registration)Registers the tool by importing it from tools.py into the package __init__.py, making it available publicly.get_entity, get_entity_annotations, get_entity_children, search_synapse, )