Skip to main content
Glama

get_page

Retrieve a specific wiki page from a Canvas course using the page's URL slug.

Instructions

Fetch a course wiki page by its url slug.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYes
page_urlYes

Implementation Reference

  • The tool handler for 'get_page'. Calls the Canvas API to fetch a course wiki page by its URL slug.
    @mcp.tool()
    def get_page(course_id: int, page_url: str) -> dict:
        """Fetch a course wiki page by its url slug."""
        return _get(f"/api/v1/courses/{course_id}/pages/{page_url}")
  • Registration: decorator @mcp.tool() registers the function as an MCP tool named 'get_page'.
    @mcp.tool()
  • Helper function _get() used by get_page to make authenticated HTTP GET requests to the Canvas API, with pagination support.
    def _get(path: str, **params) -> Any:
        params.setdefault("per_page", 100)
        url = f"{BASE}{path}"
        out = []
        with httpx.Client(headers=HEAD, timeout=30) as c:
            while url:
                r = c.get(url, params=params)
                r.raise_for_status()
                data = r.json()
                if isinstance(data, list):
                    out.extend(data)
                else:
                    return data
                url = None
                params = {}
                link = r.headers.get("Link", "")
                for part in link.split(","):
                    if 'rel="next"' in part:
                        url = part[part.find("<")+1:part.find(">")]
        return out
Behavior2/5

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

No annotations exist, so description must carry full burden. It only states 'fetch' without disclosing error behavior, authentication needs, or result format. The description is too minimal for a tool with no annotations.

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?

Single sentence of 9 words, front-loaded with action and resource. No wasted words.

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?

For a simple fetch tool with 2 parameters and no output schema, the description covers the basic operation but lacks details on return values, error cases, and parameter format. It is adequate but incomplete.

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 has 0% description coverage beyond titles. Description adds that page_url is a slug, which provides some semantic meaning. However, course_id is unexplained, and the description does not fully compensate for missing schema descriptions.

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?

Description clearly states 'Fetch a course wiki page by its url slug.' It specifies the verb, resource, and method. It distinguishes from siblings like get_file_info which handles files, not wiki pages.

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

Usage Guidelines2/5

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

No usage guidelines provided. Description does not indicate when to use this tool versus alternatives, nor does it mention prerequisites or exclusions. The agent receives no guidance on context.

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/admin978/canvas-mcp'

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