Skip to main content
Glama

get_opcode_documentation

Retrieve documentation for specific opcodes within instruction sets to understand assembly language operations and their functionality.

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

  • MCP tool handler for 'get_opcode_documentation'. Registers the tool with @mcp.tool() and implements the logic by calling the CompilerExplorerClient method, removing 'html' key from 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 actual API request to Compiler Explorer 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}" )

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