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()

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