Skip to main content
Glama

tool_list_courses

Retrieve all Gradescope courses for authenticated users, organized by instructor or student roles with details like course ID, name, semester, and assignment counts.

Instructions

List all Gradescope courses for the authenticated user.

Returns courses grouped by role (instructor vs student), including course ID, name, semester, and assignment count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual implementation of the logic for listing courses.
    def list_courses() -> str:
        """List all courses for the authenticated user.
    
        Returns courses grouped by role (instructor vs student).
        """
        try:
            conn = get_connection()
            courses = conn.account.get_courses()
        except AuthError as e:
            return f"Authentication error: {e}"
        except Exception as e:
            return f"Error fetching courses: {e}"
    
        lines = []
    
        instructor_courses = courses.get("instructor", {})
        if instructor_courses:
            lines.append("## Instructor Courses\n")
            for course_id, course in instructor_courses.items():
                lines.append(
                    f"- **{course.name}** ({course.full_name})\n"
  • The registration of the 'tool_list_courses' tool using @mcp.tool() decorator.
    @mcp.tool()
    def tool_list_courses() -> str:
        """List all Gradescope courses for the authenticated user.
    
        Returns courses grouped by role (instructor vs student),
        including course ID, name, semester, and assignment count.
        """
        return list_courses()
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the return format (grouped by role, with specific fields) and implies a read-only operation, but lacks details on permissions, rate limits, or error handling. It adds some context but is not comprehensive 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?

The description is front-loaded with the core purpose in the first sentence, followed by essential return details in the second. Both sentences add value without redundancy, making it efficient and well-structured for quick understanding.

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?

Given the tool's simplicity (0 parameters, output schema exists), the description is largely complete, covering purpose and return data. However, with no annotations, it could benefit from more behavioral context (e.g., authentication requirements or limitations) to fully compensate for the lack of structured metadata.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately omits parameter details, focusing on the tool's purpose and output, which aligns with the schema's completeness.

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 specific action ('List all Gradescope courses') and resource ('for the authenticated user'), distinguishing it from sibling tools that focus on assignments, rubrics, submissions, or grading. It precisely defines the tool's scope without ambiguity.

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?

The description implies usage context by specifying 'for the authenticated user' and listing return data (courses grouped by role, with details like ID and assignment count), which helps differentiate it from tools like tool_get_course_roster. However, it does not explicitly state when not to use it or name alternatives, leaving some guidance implicit.

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/Yuanpeng-Li/gradescope-mcp'

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