The suggest-path feature provides an AI-powered API endpoint for GROWI that suggests optimal page save locations. When an AI client (e.g., Claude via MCP) sends page content, the endpoint analyzes it and returns directory path suggestions with metadata including descriptions and grant (permission) constraints.
The feature was delivered in two phases:
Phase 2 was revised based on reviewer feedback: (1) flow/stock information classification, (2) multi-candidate AI evaluation instead of top-1 selection, (3) three-pattern path proposals (parent/subdirectory/sibling), (4) AI-generated descriptions.
POST /_api/v3/page. This feature only suggests where to save.Summary: POST endpoint at /_api/v3/ai-tools/suggest-path accepts a body field and returns an array of path suggestions. Each suggestion includes type, path (directory with trailing /), label, description, and grant. Endpoint is under a separate namespace from /_api/v3/page/ for independent access control.
Summary: Always includes a memo type suggestion as guaranteed fallback. Path is /user/{username}/memo/ when user pages are enabled, or /memo/{username}/ when disabled. Grant is 4 (owner only). Description is fixed text.
Summary: Searches for related pages using extracted keywords, filters by Elasticsearch score threshold, then passes all passing candidates to AI-based evaluation (Req 11). Includes parent page's grant. Omitted if no candidates pass the threshold.
Summary: Extracts top-level path segment from keyword-matched pages as a category type suggestion. Includes parent grant. Omitted if no match found.
Note: May overlap with the AI-based evaluation approach (Reqs 11, 12). Whether to retain, merge, or remove will be determined after reviewer discussion.
Summary: Single AI call performs keyword extraction (1-5 keywords, proper nouns prioritized) and flow/stock information type classification. Keywords (not raw content) are used for search. On failure, falls back to memo-only response.
Summary: Each suggestion includes a description field. Memo uses fixed text. Search-based suggestions use AI-generated descriptions from candidate evaluation (Req 11).
Summary: Each suggestion includes a grant field representing the parent page's grant value — the upper bound of settable permissions for child pages (a constraint, not a recommendation).
Summary: Requires valid API token or login session. Returns authentication error if missing. Uses authenticated user's identity for user-specific suggestions.
Summary: Returns validation error for missing/empty body. Internal errors return appropriate responses without exposing system details.
Summary: Candidate evaluation considers flow/stock alignment between content and candidate locations. Flow = time-bound (date-based paths, meeting terms). Stock = reference (topic-based paths). Used as a ranking factor, not a hard filter.
Summary: GROWI AI evaluates each candidate's suitability using content body, candidate path, and snippet. Ranks by content-destination fit considering relevance and flow/stock alignment. Generates description per suggestion. Falls back to memo-only on failure.
Summary: Three structural patterns relative to each matching page: (a) parent directory, (b) subdirectory, (c) sibling directory. Sibling pattern generates new directory names at the same hierarchy level as the candidate. AI determines the most appropriate pattern.
Summary: Response includes both structured metadata (informationType, type, grant) and natural language (description) so any LLM client can use it regardless of reasoning capability. All reasoning-intensive operations are server-side.
Design Rationale: MCP clients are powered by varying LLM models. Heavy reasoning is centralized in GROWI AI to prevent quality degradation with less capable clients.