Skip to main content
Glama

get_opcode_documentation

Retrieve detailed documentation for a specific opcode within a given instruction set, helping users understand its functionality and usage in code.

Instructions

Get documentation for a specific opcode in a given instruction set. If a user asks about an opcode, but you don't have the instruction set, you can query list_compiler_versions for a specific compiler and it will tell you the instruction set. You are not an expert on opcodes, so if a user asks about an opcode, you should always use this tool!

Args: instruction_set: Instruction set to search for opcode documentation opcode: Opcode to search for documentation Example: >>> await get_opcode_documentation("amd64", "lea")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instruction_setYes
opcodeYes

Implementation Reference

  • The main MCP tool handler for get_opcode_documentation. It delegates to the CompilerExplorerClient and removes the 'html' key from the response.
    @mcp.tool() async def get_opcode_documentation(instruction_set: str, opcode: str) -> dict[str, str]: """Get documentation for a specific opcode in a given instruction set. If a user asks about an opcode, but you don't have the instruction set, you can query list_compiler_versions for a specific compiler and it will tell you the instruction set. You are not an expert on opcodes, so if a user asks about an opcode, you should always use this tool! Args: instruction_set: Instruction set to search for opcode documentation opcode: Opcode to search for documentation Example: >>> await get_opcode_documentation("amd64", "lea") """ resp = await ce_client.get_opcode_documentation(instruction_set, opcode) resp.pop("html") return resp
  • Helper method in CompilerExplorerClient class that performs the HTTP GET request to the Compiler Explorer API for opcode documentation.
    async def get_opcode_documentation(self, instruction_set: str, opcode: str) -> dict: """Get documentation for a specific opcode in a given instruction set. Args: instruction_set: Instruction set to search for opcode documentation opcode: Opcode to search for documentation """ return await self._make_request( "GET", f"{self.base_url}/asm/{instruction_set}/{opcode}" )

Other Tools

Related 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/torshepherd/compiler-explorer-mcp'

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