Skip to main content
Glama

Get Course Resource / File

virtuale_get_resource
Read-only

Retrieve Virtuale files and resources via cmid or URL, following redirects with authenticated cookies. Returns metadata, inline text for text-like files, or saves to disk.

Instructions

Fetches a Virtuale file/resource by cmid (builds /mod/resource/view.php?id=) or an explicit url, following the redirect to the protected pluginfile.php content with the authenticated MoodleSession cookie. Always returns metadata (final URL, content-type, size, filename). If save_to (an absolute file path) is given, streams the file to disk and returns the path + byte size. Otherwise returns text inline for text-like files (text/JSON/XML/HTML) and extracts + returns the text of PDFs; very long text is truncated (pass save_to for the full file). Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
cmidNo
cookiesNo
save_toNo
base_urlNo
session_idNo
Behavior4/5

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

Annotations indicate readOnlyHint and openWorldHint; the description confirms read-only and adds details: redirect handling, cookie authentication, return metadata, inline text for text/PDF with truncation, and file saving behavior. No contradictions.

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?

The description is a single paragraph with front-loaded purpose and key details. It is concise with no redundancy, though could be slightly more structured with bullets for clarity.

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

Completeness3/5

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

Return values are described (metadata, file path/size, text extraction) but unclear for binary non-text files without save_to. No mention of error handling or authentication requirements beyond cookies. Adequate but with gaps given complexity.

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?

With 0% schema description coverage, the description partially compensates by explaining cmid/url identification and save_to disk saving, but fails to detail parameters like base_url, session_id, and cookies beyond a mention. Some parameters remain unexplained.

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

Purpose4/5

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

The description clearly states the tool fetches a Virtuale file/resource by cmid or URL, with specific behavior like following redirects. While it doesn't explicitly distinguish from sibling 'virtuale_list_course_files', the action of fetching a single resource vs listing is evident from context.

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 provides guidance on when to use save_to (for full file) vs inline text, but does not explicitly compare with alternative tools or state when not to use this tool. No exclusions or prerequisites mentioned.

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/gattaa/uniboh'

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