list_note_media
Get a list of media blobs and direct links from a Google Keep note using its note ID.
Instructions
List note media blobs and direct media links when available.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/server/cli.py:368-383 (handler)The tool handler function 'list_note_media' decorated with @mcp.tool(). It retrieves a note by ID, iterates over its blobs, collects blob_id, type, and media_link, then returns JSON.
@mcp.tool() def list_note_media(note_id: str) -> str: """List note media blobs and direct media links when available.""" keep, note = _get_note_or_raise(note_id) media = [] for blob in note.blobs: media.append( { "blob_id": blob.id, "type": blob.blob.type.value if blob.blob and blob.blob.type else None, "media_link": keep.getMediaLink(blob), } ) return json.dumps(media) - src/server/cli.py:17-22 (helper)Helper function '_get_note_or_raise' used by list_note_media to fetch a note by ID or raise a ValueError.
def _get_note_or_raise(note_id: str): keep = get_client() note = keep.get(note_id) if not note: raise ValueError(f"Note with ID {note_id} not found") return keep, note - src/server/cli.py:368-368 (registration)The @mcp.tool() decorator registers 'list_note_media' as an MCP tool with the FastMCP server.
@mcp.tool() - src/server/cli.py:369-369 (schema)Type signature: input parameter 'note_id: str', return type 'str' (JSON serialized list).
def list_note_media(note_id: str) -> str: