Table of Contents

Type inspection (llmcpp)

Type inspection exposes properties of compiler-known types. The tool-server tests inspect their Account class using describe_type; the corresponding MCP request is:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "describe_type",
    "arguments": {
      "type": "Account"
    }
  }
}

The result can describe canonical type, size, alignment, construction, copying, moving, and polymorphism. Enums also expose their enumerators. Type names are interpreted in the active body's compiler context.

This helps an agent avoid unsupported assumptions, such as requiring default construction from a type that does not provide it. Member inspection answers a different question: which fields and operations the class exposes.

General type properties do not establish that a complete candidate expression is valid. Compile the candidate to check the actual operations and conversions it uses.