Skip to main content
Glama
parsiya

Trailmark MCP Server

by parsiya

clear_annotations

Removes all annotations from a specified node in a code repository graph. Provide the node name, and optionally its kind and session ID.

Instructions

Remove annotations from a node.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
kindNo
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler logic for clear_annotations. Resolves the session handle, optionally converts the kind string to an AnnotationKind, then delegates to QueryEngine.clear_annotations() on the underlying engine.
    def clear_annotations(
        self,
        name: str,
        kind: str | None = None,
        session_id: str | None = None,
    ) -> dict[str, Any]:
        handle = self._require_scanned_handle(session_id)
        annotation_kind = self._annotation_kind(kind) if kind is not None else None
        success = handle.engine.clear_annotations(name, annotation_kind)
        return {"success": success, "name": name, "kind": kind}
  • Schema/registration metadata for the clear_annotations tool, defining its name, category (mutation), description, and parameter types.
    ToolSpec(
        name="clear_annotations",
        category="mutation",
        description="Remove annotations from a node.",
        parameters={
            "name": _param("string", required=True),
            "kind": _param("string|null", default=None),
            "session_id": SESSION_ID_PARAM,
        },
    ),
  • MCP tool decorator registration. The @mcp.tool() decorator registers clear_annotations as an MCP tool, delegating to the runtime method.
    @mcp.tool()
    def clear_annotations(name: str, kind: str | None = None, session_id: str | None = None) -> dict[str, Any]:
        """Remove annotations from a node."""
        return app_runtime.clear_annotations(name, kind=kind, session_id=session_id)
Behavior2/5

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

No annotations provided, so description carries full burden. It only states 'Remove annotations from a node' without details on scope (e.g., all annotations vs filtered by kind) or side effects.

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

Conciseness3/5

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

Single sentence is concise but may be too terse for a tool with 3 parameters. It front-loads the purpose but omits necessary detail.

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

Completeness2/5

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

Given no annotations and presence of output schema, description should provide more context on behavior (e.g., what happens if node doesn't exist, whether it returns results). Incomplete for a mutation tool.

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

Parameters1/5

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

Schema description coverage is 0%, and description does not explain parameters. 'name' is required but not described; 'kind' and 'session_id' are absent from description.

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

Purpose5/5

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

Description clearly states verb and resource: 'Remove annotations from a node.' It is distinct from sibling tools like 'annotate_node' and 'annotations_of'.

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?

No guidance on when to use this tool versus alternatives or any prerequisites. The description does not mention when to use 'clear_annotations' over other tools.

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/parsiya/trailmark-mcp-server'

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