Detect Open Scrivener Project
detect_open_projectDetects the currently open Scrivener project on macOS, resolving window names to .scriv paths for direct action without asking for a path.
Instructions
Detect which Scrivener project the user currently has open in the desktop Scrivener app, so you can act on it without asking for a path. Use this when the user says "my project", "the project I have open", or gives a command with no project specified. Reads the open window names from the running app and resolves them to .scriv paths on disk; it does not open anything. If exactly one project is open, pass its path to open_project. macOS only right now (returns supported=false elsewhere; fall back to discover_projects). The first use may prompt macOS to allow the client app to control Scrivener.
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": "detect_open_project"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| searchPath | No | Optional extra directory to resolve project names against, in addition to the default locations. Absolute or ~-relative path. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | Number of resolved open projects. | |
| running | Yes | Whether the Scrivener app appears to be running. | |
| supported | Yes | False on platforms where detection is not implemented (non-macOS). | |
| unresolved | Yes | Open project names that could not be matched to a .scriv folder on disk. | |
| openProjects | Yes | Open projects resolved to a .scriv path. |