get_issue
Retrieve the full history of a specific issue by its ID to get detailed context without loading the entire project summary.
Instructions
Read one specific issue's full history by ID (token-efficient).
Use this when you only need one issue's context instead of the whole
summary. Example: get_issue('0042').Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/projectmem/mcp_server.py:248-260 (handler)The tool handler for 'get_issue'. Decorated with @mcp.tool() and @safe_tool. Reads one specific issue's full history by ID by globbing for '{issue_id}-*.md' in the issues directory and returning the file contents.
@mcp.tool() @safe_tool def get_issue(issue_id: str) -> str: """Read one specific issue's full history by ID (token-efficient). Use this when you only need one issue's context instead of the whole summary. Example: get_issue('0042').""" from projectmem.storage import issues_dir idir = issues_dir() matches = list(idir.glob(f"{issue_id}-*.md")) if not matches: return f"No issue found with ID {issue_id}." return matches[0].read_text(encoding="utf-8") - src/projectmem/mcp_server.py:248-248 (registration)Registration via the @mcp.tool() decorator, which registers the function as an MCP tool on the FastMCP server instance.
@mcp.tool() - src/projectmem/mcp_server.py:251-254 (schema)The docstring serves as the schema/description for the tool. It describes the tool's purpose and provides an example usage (get_issue('0042')). The parameter 'issue_id: str' is the input schema.
"""Read one specific issue's full history by ID (token-efficient). Use this when you only need one issue's context instead of the whole summary. Example: get_issue('0042').""" - src/projectmem/storage.py:80-81 (helper)The issues_dir() helper function used by get_issue. It returns the path to the .projectmem/issues/ directory, calling require_mem_dir() to find the project root.
def issues_dir(root: Path | None = None) -> Path: return require_mem_dir(root) / ISSUES_DIR - src/projectmem/storage.py:13-13 (helper)The ISSUES_DIR constant defining the issues subdirectory name as 'issues'.
ISSUES_DIR = "issues"