Skip to content

managed tools are compiled but not injected into OpenClaw/cllama runtime #115

@mostlydev

Description

@mostlydev

Summary

Managed tools are compiled into per-agent tools.json manifests, but OpenClaw agents behind cllama passthrough still do not actually receive or see those tools at runtime.

In Tiverton, claw up -d succeeds, .claw-runtime/context/<agent>/tools.json is populated, and the live pod is healthy. But agents still report that they do not have MCP trading tools and fall back to wrapper scripts.

Expected

Given a service descriptor with version: 2 tools[] and a pod service subscribed via x-claw.tools, the agent should be able to call those managed tools through the normal model tool-calling path.

At minimum, one of these needs to be true:

  1. cllama loads tools.json from /claw/context/<agent>/tools.json and injects provider-native tools[] into chat requests before forwarding upstream, or
  2. the runner config (openclaw.json here) is materialized with the managed tools locally so the runner sends them itself.

Actual

  • tools.json is compiled correctly for Weston:
    • /home/clawdbot/tiverton-house/.claw-runtime/context/weston/tools.json
    • contains tools like trading-api.propose_trade, trading-api.get_market_context, etc.
  • Weston's generated OpenClaw config contains only the built-in web search tool:
    • /home/clawdbot/tiverton-house/.claw-runtime/weston/config/openclaw.json
    • tools.web.search.provider = "perplexity"
    • no managed trading tools appear there
  • The running cllama container mounts the context root at /claw/context
  • The live cllama logs show feed injection activity (feed_fetch) but no evidence of tool loading/injection/execution for Weston
  • Weston explicitly reported in Discord that he has no MCP trading tools in his tool list and is falling back to mounted scripts

Evidence from current source

The current OpenAI handler in cllama appears to inject feeds and current time only:

  • cllama/internal/proxy/handler.go
    • fetchFeeds(...)
    • feeds.InjectOpenAI(payload, feedBlock)
    • feeds.InjectOpenAI(payload, currentTimeLine(...))

I do not see any adjacent logic that loads tools.json, injects tools[], intercepts tool calls, or executes managed HTTP tools.

This also seems to conflict with the current Clawdapus changelog, which says:

  • compiled tools.json is written into cllama context
  • managed tool mediation in cllama is supported

Repro

  1. Configure a service with a v2 claw.describe containing tools[]
  2. Subscribe an OpenClaw agent via x-claw.tools
  3. Run claw up -d
  4. Confirm .claw-runtime/context/<agent>/tools.json exists and contains the expected tools
  5. Ask the live OpenClaw agent whether it has those tools available

Observed environment

  • host claw version: 0.5.1
  • cllama image: ghcr.io/mostlydev/cllama:latest
  • OpenClaw image: ghcr.io/openclaw/openclaw:2026.3.24
  • live pod: Tiverton House

Impact

This blocks the main user-visible goal of the managed-tools rollout for OpenClaw pods: traders are told to prefer tools, the manifests are generated, but the tools are not actually reachable in the agent runtime.

Related

This is separate from #112, which is about descriptor discovery for build-only services without image:. That issue was worked around and the pod is otherwise live.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions