Skip to main content
Glama

get_activity_counts

Read-onlyIdempotent

Count Nextcloud activities per day over a chosen period to reveal when events occurred and spot activity patterns.

Instructions

Count the current user's activities per day over the last days, e.g. to see when something happened.

Needs Nextcloud 35 (Activity 8). Days are the user's days in their Nextcloud time zone, ending today, while a date passed to get_activity's start and end is a UTC day; to list one of these days, pass start and end as times with the user's UTC offset (e.g. 2026-09-20T00:00:00+02:00 and 2026-09-20T23:59:59+02:00).

Args: activity_filter: Activity filter id (default: "all"); see list_activity_filters. days: Number of days ending today (1-366, default 30). search: Only count activities whose file path contains this text (2-255 characters). actor: Only count activities done by this user ID. object_type: Only count activities about this object; must be used together with object_id, and with activity_filter left at "all". object_id: The object's ID, e.g. a file ID for object_type "files".

Returns: JSON object with "from" and "to" (dates), "counts" (date to count, only days with activity), "total" and "max". "partial_before" is set when Nextcloud stopped counting at its row limit: counts for that date and earlier are missing, so a shorter window gives complete numbers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNo
actorNo
searchNo
object_idNo
object_typeNo
activity_filterNoall

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare read-only/idempotent/non-destructive, and the description adds substantial context beyond them: a Nextcloud 35 (Activity 8) version requirement, the user-timezone vs UTC-day distinction, and the 'partial_before' row-limit truncation semantics that affect result completeness. It also documents the return shape and how to get complete numbers.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then constraints, then Args, then Returns – a logical structure. The Args block is verbose but justified by the 0% schema coverage; a little tightening is possible but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter read tool with truncation risk, it covers purpose, when to use it, version requirements, timezone/precision pitfalls, every parameter's semantics, and the meaning of the returned fields including the partial-result caveat. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full burden and does: it documents all six params including defaults and ranges (days 1-366 default 30, search 2-255 chars), the cross-parameter constraint that object_type requires object_id and activity_filter='all', and the meaning of activity_filter with a pointer to list_activity_filters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource+scope: 'Count the current user's activities per day over the last days'. It also implicitly distinguishes itself from get_activity by noting that get_activity lists one of these days rather than counting them, so an agent can tell the two apart.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear use case ('e.g. to see when something happened'), points to list_activity_filters for valid filter ids, and explains the hand-off to get_activity with concrete start/end values. It stops short of an explicit when-not-to-use rule, so 4 rather than 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools