surface
Finds and returns relevant memories for a file during editing, showing paths, titles, types, priorities, and match details while skipping memories already shown in the session.
Instructions
Memories (not constraints) about a file: listed in its files, or mentioned in the body.
Returns JSON {"file", "memories": [{"path", "title", "type", "priority", "match"}]}.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "surface"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | File being edited: absolute or relative to the project. Empty (with no relative_path) returns an empty result. | |
| limit | No | Maximum memories, 1-50. | |
| project | No | Project; defaults to --project. | |
| session | No | Hooks pass ${session_id}: a memory already shown by surface in this session is not repeated. | |
| hook_event | No | Only for Claude Code hooks: ${hook_event_name}. Omit otherwise. | |
| project_dir | No | Absolute project directory (hooks pass ${cwd}); used to relativize file. | |
| relative_path | No | Serena edits pass relative_path instead of file; used when file is empty. |