Skip to main content
Glama
susheel

Synapse MCP Server

get_entity_annotations

Retrieve annotations for Synapse entities such as datasets, projects, folders, files, and tables to access metadata and descriptive information programmatically.

Instructions

Get annotations for an entity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'get_entity_annotations'. Validates ID, fetches annotations via BaseEntityOperations, formats them, and handles errors.
    @mcp.tool(
        title="Fetch Entity Annotations",
        description="Return custom annotation key/value pairs for a Synapse entity.",
        annotations={
            "readOnlyHint": True,
            "idempotentHint": True,
            "destructiveHint": False,
            "openWorldHint": True,
        },
    )
    def get_entity_annotations(entity_id: str, ctx: Context) -> Dict[str, Any]:
        """Return custom annotation key/value pairs for a Synapse entity."""
        if not validate_synapse_id(entity_id):
            return {"error": f"Invalid Synapse ID: {entity_id}"}
    
        try:
            entity_ops = get_entity_operations(ctx)
            annotations = entity_ops["base"].get_entity_annotations(entity_id)
            return format_annotations(annotations)
        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}
  • Core helper method in BaseEntityOperations class that calls synapse_client.get_annotations(entity_id) to retrieve raw annotations.
    def get_entity_annotations(self, entity_id: str) -> Dict[str, Any]:
        """Get annotations for an entity.
        
        Args:
            entity_id: The Synapse ID of the entity
            
        Returns:
            The entity annotations as a dictionary
        """
        # Get annotations using the get_annotations method
        annotations = self.synapse_client.get_annotations(entity_id)
            
        # Ensure we return a dictionary
        if annotations is None:
            return {}
        return annotations
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Get annotations' but doesn't clarify if this is a read-only operation, what permissions might be required, how the annotations are formatted, or if there are rate limits. The description is too minimal to provide meaningful behavioral context beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, straightforward sentence with no wasted words. It's front-loaded and efficiently conveys the core action, though it could be more informative without sacrificing brevity. The structure is clear but minimal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (which likely defines the return values), the description doesn't need to explain outputs. However, with 1 parameter, 0% schema coverage, and no annotations, the description is too sparse—it doesn't provide enough context about the entity or annotations to be fully helpful. It's minimally adequate but leaves significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description doesn't add any meaning to the 'entity_id' parameter beyond what's implied by the tool name. It doesn't explain what an entity ID is, its format, or where to obtain it, failing to compensate for the lack of schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action ('Get') and target ('annotations for an entity'), which is clear but vague. It doesn't specify what type of annotations or what an 'entity' refers to in this context. While it distinguishes from siblings like 'get_entity' or 'query_entities', it lacks specificity about the resource being retrieved.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing a valid entity ID, or differentiate from siblings like 'get_entity' (which might retrieve entity metadata) or 'query_entities' (which might search for entities). There's no explicit when/when-not or alternative tool recommendations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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