read_note
Retrieve and display the content of a specific Markdown note file to access stored information and review note details.
Instructions
Read the contents of a note
Args: filename: Note filename (with .md extension)
Returns: Note content
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes |
Implementation Reference
- notes_server.py:88-107 (handler)The handler function for the 'read_note' tool. It reads the content of a specified note file from the notes directory. Includes registration via @mcp.tool() decorator and schema definition via function signature and docstring.@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:88-88 (registration)Registration of the read_note tool using the @mcp.tool() decorator.@mcp.tool()
- notes_server.py:90-98 (schema)Input/output schema defined in the docstring: filename (str) input, str output.""" Read the contents of a note Args: filename: Note filename (with .md extension) Returns: Note content """