feat(mcp): get_stats tool for writing stats #67

Closed
opened 2026-11-01 14:25:03 +00:00 by jfro · 0 comments
Owner

Give the chat and API-key agents read-only access to the writing stats, so draw_page / make_pdf reports can be built from them (a Markdown table, or a fenced svg chart).

One read-only lookup, get_stats, in RmAnalyzer.Chat.Tools (so AgentTools gets it too), wrapping RmAnalyzer.Stats:

  • filter: all, folder:<id>, notebook:<id> or tag:<name>, as on the Stats page
  • optional from / to dates (ISO)
  • views: any of summary, by_day, over_time (by week|month, count), top_words (limit, hidden words left out), on_this_day
  • compact JSON, ISO dates; no new deps

Must:

  • a key limited to some folders sees stats only for what it reaches; a filter pointing outside it is refused
  • versions written by the app (by_app, e.g. drawn reports) still don't count
  • Logger diagnostics (user id, views, filter, entry count, duration)
  • docs/mcp.md + docs/stats.md and the tool description updated
Give the chat and API-key agents read-only access to the writing stats, so `draw_page` / `make_pdf` reports can be built from them (a Markdown table, or a fenced svg chart). One read-only lookup, `get_stats`, in `RmAnalyzer.Chat.Tools` (so `AgentTools` gets it too), wrapping `RmAnalyzer.Stats`: - `filter`: `all`, `folder:<id>`, `notebook:<id>` or `tag:<name>`, as on the Stats page - optional `from` / `to` dates (ISO) - `views`: any of `summary`, `by_day`, `over_time` (`by` week|month, `count`), `top_words` (`limit`, hidden words left out), `on_this_day` - compact JSON, ISO dates; no new deps Must: - a key limited to some folders sees stats only for what it reaches; a filter pointing outside it is refused - versions written by the app (`by_app`, e.g. drawn reports) still don't count - Logger diagnostics (user id, views, filter, entry count, duration) - docs/mcp.md + docs/stats.md and the tool description updated
jfro added this to the v1.6.0 milestone 2026-11-01 14:25:03 +00:00
jfro closed this issue 2026-11-01 15:36:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfro/rm-analyzer#67
No description provided.