Skip to main content
Glama

get_course_logs

Retrieve approximate course activity logs: per-user first and last access, flagging those active within a configurable time window (default 24 hours).

Instructions

Approximate activity log for a course: per-user firstaccess/lastaccess derived from core_enrol_get_enrolled_users. Flags users active within the last N hours (default 24). Moodle core does not expose a generic activity-log WS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYes
hours_sinceNoWindow (in hours) to flag a user as "recent". Default 24h.
Behavior4/5

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

With no annotations provided, the description carries the transparency burden. It discloses that the log is approximate, derived from enrollment data, and flags users within a time window. It does not explicitly state read-only behavior, but the nature of the tool implies it. The limitations are well communicated.

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

Conciseness5/5

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

The description is two sentences with no fluff. It front-loads the core purpose and efficiently covers the key behavioral detail (flagging window) and context (no generic WS). Every word earns its place.

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

Completeness4/5

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

The tool is simple with 2 parameters and no output schema. The description explains the purpose, the approximate nature, the derivation source, and the time-window behavior. It hints at return values (per-user firstaccess/lastaccess) without detailing them, which is acceptable given no output schema. A small gap is not specifying the response format or error handling.

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

Parameters3/5

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

Schema coverage is 50%: hours_since has a description, course_id does not. The description reinforces the meaning of hours_since by explaining the 'last N hours' flagging, but adds little for course_id beyond its obvious role. It partially compensates for the missing course_id description but does not fully advance beyond schema details.

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?

The description clearly states the tool's purpose: providing an approximate activity log for a course with per-user firstaccess/lastaccess data. It specifies the derivation source (core_enrol_get_enrolled_users) and the flagging behavior, distinguishing it from siblings like get_grades or get_completion.

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

Usage Guidelines3/5

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

The description implies usage context by noting that Moodle core does not expose a generic activity-log WS, suggesting this is the workaround. However, it does not explicitly state when to use this tool over alternatives or provide exclusion criteria.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sernobre/moodle-mcp-sernobre'

If you have feedback or need assistance with the MCP directory API, please join our Discord server