Token-Optimized Syntax Tree String IR Generator — AST scraper for LLM RAG context generation with semantic search, dependency graph analysis, and code navigation.
Tostr demonstrates solid tool design with clear naming (verb-noun pattern), comprehensive parameter descriptions, and well-documented schemas. All 8 tools have explicit descriptions (avg 180 chars) and input schemas with typed parameters. However, output schemas are not formally documented in the source, and error handling lacks recovery guidance. Tool composition is strong, each tool has a single responsibility and clear dependencies. The server properly validates workspace paths and provides actionable error messages. Missing: explicit output schema documentation, error classification (retryable vs fatal), and confirmation patterns for destructive operations.
Scaffold Tostr's authored config files (tostr.toml, .tostrignore) and gitignore the cache. Does NOT parse or build the database — call `parse` for that. This step is optional; defaults work without it. Use it only to materialize config files the user wants to review or edit.
Inspect a specific code structure (file, class, method, field) by UID or path. Returns full details including signature, description, dependencies, and pinned notes.
Pin a durable note to a code structure. Notes survive reparses and are useful for agents to leave findings and memory across sessions.
Edit an existing note by its ID.
Remove a note by its ID.
BUILD STEP: run this before querying a project (skeleton/search/inspect) for the first time. Parse a project, build the AST + dependency graph + semantic embeddings, and write the cache to .tostr/cache.db. Also starts a background watcher that keeps the cache fresh as files change. Safe to call for multiple projects; each is tracked independently by its absolute path.
Output schemas not formally documented. Tools return InspectResult, SkeletonResult, SearchResult objects but no JSON Schema definitions visible in source. LLMs cannot plan downstream calls without knowing response structure.
Error handling lacks recovery guidance and classification. _resolve_workspace() raises TostrError with helpful messages, but other tools do not document error conditions, retryability, or next steps for LLM recovery.
Destructive operations (note_remove) lack confirmation or dry-run pattern. Agents can permanently delete notes without a confirmation step, risking accidental data loss.
Inferred effective spec: 2026-07-28+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | B | 71 | 2026-07-28+ | v2 |
Semantic search across the project's code using embeddings. Returns ranked results by relevance.
Render a project's file tree with descriptions and dependency edges, optionally filtered by path glob. Useful for high-level project navigation and understanding structure.
search() description is generic ('Semantic search across the project's code using embeddings'). Does not explain when to use it vs inspect(), what 'relevance' means, or token cost implications of large result sets.
parse() has 4 optional parameters (use_cache, language, no_llm, llm) with interdependencies not documented. LLMs may pass conflicting combinations (no_llm=true AND llm='gemini'). Mutual exclusivity should be explicit.