Skip to content

Enhance mm_get_context to expose mockServer state in e2e #13

Description

@cryptotavares

Summary

mm_get_context currently reports capability presence (e.g., mockServer) but does not expose whether the mock server is actually enabled/running. This is causing agent/operator confusion in e2e flows where mock server is opt-in.

Problem

In e2e, the mock server capability may be available while still disabled by default. From the client side, mm_get_context does not provide enough signal to distinguish:

  • capability exists
  • capability enabled by config
  • capability currently running

This makes it hard to reliably reason about whether network mocks are active.

Proposal

For e2e context, extend mm_get_context output to include explicit mock server state, for example:

{
  "currentContext": "e2e",
  "capabilities": {
    "mockServer": {
      "available": true,
      "enabled": false,
      "running": false,
      "port": 8000
    }
  }
}

For prod context (which has no mock server capability), return either:

  • no mockServer field, or
  • mockServer: { "available": false }

Why this helps

  • Removes ambiguity between capability presence vs actual active state
  • Improves agent ergonomics and deterministic automation flows
  • Makes debugging easier when mocks are expected but not enabled

Acceptance criteria

  • mm_get_context in e2e includes mock server state (available, enabled, running, and port if known)
  • mm_get_context in prod clearly indicates mock server is unavailable
  • Documentation/examples updated to reflect the new response shape

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions