Skip to main content
Glama

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
NameRequiredDescriptionDefault
entity_idYes

Implementation Reference

  • 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}]
  • 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, }, )
  • 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, )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/susheel/synapse-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server