Skip to main content
Glama
Jij-Inc

Jij MCP Server

Official
by Jij-Inc

qiskit_tutorial

Fetch Qiskit tutorials from IBM Quantum Learning Hub to learn quantum computing concepts through practical examples and code.

Instructions

Fetch a Qiskit tutorial from the IBM Quantum Learning Hub.
First, get the table of contents (toc) and check the tutorial names.
Tutorial names should be specified in lowercase with hyphens (e.g., "variational-quantum-eigensolver", "quantum-approximate-optimization-algorithm").
If the tutorial name is not found, it will return an error message.

Args:
    tutorial_name (str): The name of the tutorial to fetch. Use "toc" for the table of contents.
    If the tutorial name is not found, it will return an error message.
    tutorial_name should be in lowercase and hyphenated (e.g., "variational-quantum-eigensolver", "quantum-approximate-optimization-algorithm").
Returns:
    str: The tutorial content in Markdown format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tutorial_nameYes

Implementation Reference

  • The main handler function for the 'qiskit_tutorial' tool. It is registered via @mcp.tool() decorator. Fetches and returns Qiskit tutorial content from IBM Quantum Learning Hub in Markdown format, handling TOC separately.
    @mcp.tool()
    async def qiskit_tutorial(tutorial_name: str) -> str:
        """
        Fetch a Qiskit tutorial from the IBM Quantum Learning Hub.
        First, get the table of contents (toc) and check the tutorial names.
        Tutorial names should be specified in lowercase with hyphens (e.g., "variational-quantum-eigensolver", "quantum-approximate-optimization-algorithm").
        If the tutorial name is not found, it will return an error message.
    
        Args:
            tutorial_name (str): The name of the tutorial to fetch. Use "toc" for the table of contents.
            If the tutorial name is not found, it will return an error message.
            tutorial_name should be in lowercase and hyphenated (e.g., "variational-quantum-eigensolver", "quantum-approximate-optimization-algorithm").
        Returns:
            str: The tutorial content in Markdown format.
        """
        if tutorial_name == "toc":
            url = "https://learning.quantum.ibm.com/catalog/tutorials"
        else:
            url = f"https://learning.quantum.ibm.com/tutorial/{tutorial_name}"
    
        response: FetchResponse = await fetch_as_markdown(url)
        if response.isError:
            return response.errorMessage if response.errorMessage else "Error fetching the content"
    
        if tutorial_name == "toc":
            # If the tutorial name is "toc", return the table of contents
            return url + "\n" + response.content[0]["text"] + "\n\n" + "Please specify the tutorial name in lowercase and hyphenated (e.g., 'variational-quantum-eigensolver')."
        else:
            return url + "\n" + response.content[0]["text"] 
  • Input schema defined in the docstring: tutorial_name (str), with specific formatting requirements and special handling for 'toc'.
    Args:
        tutorial_name (str): The name of the tutorial to fetch. Use "toc" for the table of contents.
        If the tutorial name is not found, it will return an error message.
        tutorial_name should be in lowercase and hyphenated (e.g., "variational-quantum-eigensolver", "quantum-approximate-optimization-algorithm").
    Returns:
        str: The tutorial content in Markdown format.
    """
  • Tool registration using the @mcp.tool() decorator.
    @mcp.tool()
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 key behaviors: fetching from a specific source (IBM Quantum Learning Hub), returning error messages if the tutorial isn't found, and returning content in Markdown format. However, it doesn't cover important aspects like rate limits, authentication requirements, or whether this is a read-only operation. The description doesn't contradict any annotations since none are provided.

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 appropriately sized and well-structured. It begins with the core purpose, then provides usage instructions, parameter details, and return information. While slightly repetitive in mentioning error behavior twice, each sentence serves a clear purpose. The information is front-loaded with the most important details first.

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 moderate complexity (single parameter, no output schema, no annotations), the description is reasonably complete. It covers purpose, usage flow, parameter semantics, error handling, and return format. The main gap is the lack of behavioral details like authentication or rate limits, but for a tutorial-fetching tool with a simple interface, this is acceptable.

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?

The schema description coverage is 0%, so the description must fully compensate. It provides excellent parameter semantics: it explains that 'tutorial_name' should be a string, specifies 'toc' as a special value for the table of contents, provides formatting requirements (lowercase with hyphens), gives concrete examples, and explains error behavior. This adds substantial meaning beyond what the bare schema provides.

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's purpose: 'Fetch a Qiskit tutorial from the IBM Quantum Learning Hub.' This specifies both the verb ('fetch') and resource ('Qiskit tutorial'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate this from sibling tools like 'fetch_as_markdown' or 'qiskit_v0tov1v2_migration_guide', which might have overlapping domains.

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 provides clear context on when to use this tool: it instructs to first get the table of contents and check tutorial names, and specifies that 'tutorial_name' should be 'toc' for the table of contents. This gives practical guidance on how to use the tool effectively. However, it doesn't explicitly state when to use this versus alternatives like 'fetch_as_markdown' or other Qiskit-related tools.

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/Jij-Inc/Jij-MCP-Server'

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