read_note
Retrieve the content of a Markdown note by specifying its filename to access stored information from the Notes MCP Server.
Instructions
Read the contents of a note
Args: filename: Note filename (with .md extension)
Returns: Note content
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filename": "<filename>"
},
"name": "read_note"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- notes_server.py:88-106 (handler)The handler function for the 'read_note' tool. It reads the specified note file from the notes directory and returns its content, or an error message if the file does not exist. Decorated with @mcp.tool() for registration.
@mcp.tool() def read_note(filename: str) -> str: """ Read the contents of a note Args: filename: Note filename (with .md extension) Returns: Note content """ ensure_notes_dir() filepath = os.path.join(NOTES_DIR, filename) if not os.path.exists(filepath): return f"Note '{filename}' not found" with open(filepath, "r", encoding="utf-8") as f: return f.read() - notes_server.py:90-98 (schema)Input/output schema defined in the docstring of the read_note function, describing the filename parameter and return value.
""" Read the contents of a note Args: filename: Note filename (with .md extension) Returns: Note content """ - notes_server.py:88-88 (registration)Registration of the 'read_note' tool via the @mcp.tool() decorator.
@mcp.tool()