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
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| kind | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
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, }, ), - src/trailmark_mcp/mcp_app.py:157-160 (registration)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)