Site Tools


llmcpp-name-lookup

Table of Contents

Name lookup (llmcpp)

Name lookup resolves a name from the location of the generated body. This MCP request asks the compiler about the private field used in the repository's Account fixture:

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

The JSON-RPC identifier matches the reply to this request. lookup returns declarations found and their usability from the active body's context.

Inside Account::deposit, cents is accessible; in the external peek function, access is restricted. Lookup can also check names such as std::cout rather than assuming their declarations are available.

Finding a declaration is not enough to validate every expression involving it. The agent uses candidate compilation to check its complete proposed body.

llmcpp-name-lookup.md · Last modified: by 127.0.0.1