Skip to main content
Glama
feuerdev
by feuerdev

trash_note

Move a note to the trash using its note ID. Remove unwanted notes from your active list.

Instructions

Move a note to trash.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
note_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The trash_note tool handler: retrieves the note, checks if modifiable, calls note.trash(), syncs, and returns the serialized note as JSON.
    @mcp.tool()
    def trash_note(note_id: str) -> str:
        """Move a note to trash."""
        keep, note = _get_note_or_raise(note_id)
        _ensure_modifiable(note)
    
        note.trash()
        keep.sync()
        return json.dumps(serialize_note(note))
  • The @mcp.tool() decorator registers trash_note as an MCP tool.
    @mcp.tool()
  • serialize_note helper serializes the note (including trashed status) to a dict for JSON output.
    def serialize_note(note):
        """
        Serialize a Google Keep note into a dictionary.
        
        Args:
            note: A Google Keep note object
            
        Returns:
            dict: A dictionary containing the note's id, title, text, pinned status, color and labels
        """
        payload = {
            'id': note.id,
            'title': note.title,
            'text': note.text,
            'type': note.type.value,
            'pinned': note.pinned,
            'archived': note.archived,
            'trashed': note.trashed,
            'color': note.color.value if note.color else None,
            'labels': [serialize_label(label) for label in note.labels.all()],
            'collaborators': list(note.collaborators.all()),
        }
    
        if hasattr(note, 'items'):
            payload['items'] = [serialize_list_item(item) for item in note.items]
    
        payload['media'] = [
            {
                'blob_id': blob.id,
                'type': blob.blob.type.value if blob.blob and blob.blob.type else None,
            }
            for blob in note.blobs
        ]
    
        return payload
  • DummyNote.trash() test helper used in testing the trash_note tool.
    def trash(self):
        self.trashed = True
  • Test asserting trash_note sets trashed=True on the note.
    def test_note_state_transitions(keep):
        assert json.loads(cli.set_note_color("n1", "red"))["color"] == "red"
        assert json.loads(cli.pin_note("n1", True))["pinned"] is True
        assert json.loads(cli.archive_note("n1", True))["archived"] is True
        assert json.loads(cli.trash_note("n1"))["trashed"] is True
        assert json.loads(cli.restore_note("n1"))["trashed"] is False
Behavior2/5

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

Without annotations, the description should disclose behavioral traits like reversibility, permission requirements, or side effects. 'Move to trash' is vague and does not indicate whether the action is reversible or what happens to collaborators.

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?

Single sentence, no wasted words. Appropriate for a simple parameterless (except ID) tool, but could be slightly more informative.

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 the existence of output schema and many sibling tools, the description is too sparse. No mention of return behavior, error conditions, or side effects on related data (e.g., labels, lists).

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?

The sole parameter note_id has 0% schema description coverage, and the description adds no meaning beyond its name. No hints on format or valid values.

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?

The description clearly states the verb 'move' and resource 'note to trash', distinguishing it from siblings like 'archive_note' and 'delete_note' by implying a soft delete action.

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 trash versus other similar operations (archive, delete, pin). Missing context about prerequisites or alternatives among the many note sibling 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/feuerdev/keep-mcp'

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