Mockifyer

v0.1.5
io.github.sgedda/mockifyer-mcp Checked 4 hours ago Published 7 days ago

Query and edit Mockifyer mocks, scenarios, and traces via the dashboard API.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

mockifyer_get_mock_ai_context

Return a lightweight AI-friendly projection of a mock recording (selected fields, schema summary, state hints). Prefer this over mockifyer_get_mock to avoid huge response payloads.

ParameterTypeDescription
filename *stringMock filename from mockifyer_list_mocks or mockifyer_search_mocks
excludePathsarrayDot paths to exclude
includePathsarrayDot paths to force include (e.g. orders.*.status)
includeRelatedbooleanInclude sibling mocks on same endpoint for cross-recording state hints (default true)
maxPathsintegerMax selected body paths (default 25)
modestringprofile (default): fields+schema; schema: types only; suggest: ranked paths; full: entire mock
scenariostringScenario name (defaults to dashboard active scenario)

mockifyer_list_mocks

List mock recordings in a scenario (filename, endpoint, method, modified).

ParameterTypeDescription
scenariostringScenario name (defaults to active scenario)

mockifyer_search_mocks

Search mocks by filename, endpoint URL, or method substring.

ParameterTypeDescription
q *stringSearch query
limitintegerMax results (default 200)
scenariostring

mockifyer_get_mock

Fetch the full mock recording (request + response). Use mockifyer_get_mock_ai_context when you only need semantic/state fields.

ParameterTypeDescription
filename *string
scenariostring

mockifyer_list_scenarios

List available scenarios and the currently active scenario.

mockifyer_set_scenario

Switch the dashboard active/global scenario. For Redis/sqlite multi-client isolation prefer mockifyer_set_client_lane_scenario so Playwright/app lanes stay independent.

ParameterTypeDescription
scenario *stringScenario name (letters, numbers, hyphens, underscores)

mockifyer_create_scenario

Create a scenario and make it active. Pass deriveFrom to copy mocks (and date config) from an existing scenario — e.g. check-in-open derived from default before applying $pool refs/overrides.

ParameterTypeDescription
scenario *stringNew scenario name
deriveFromstring | nullExisting scenario to copy from; omit/null for empty

mockifyer_set_client_lane_scenario

Map a Redis/sqlite client lane (MOCKIFYER_CLIENT_ID) to a scenario for isolated E2E/demo runs. Requires dashboard --provider redis|sqlite. Pass scenario=null to clear the lane mapping.

ParameterTypeDescription
clientId *stringClient lane id (e.g. trips-e2e-checkin)
scenario *string | nullScenario to bind, or null to clear the lane override

mockifyer_list_client_lanes

List Redis/sqlite client lanes and their configured scenarios (disabled on filesystem provider). Use before mockifyer_set_client_lane_scenario.

mockifyer_get_endpoint_stats

Summarize mock counts per endpoint, HTTP method, and status code for a scenario.

ParameterTypeDescription
scenariostring

mockifyer_get_field_overrides

Get replay-time field overrides for a mock (path/value pairs only). Prefer this over mockifyer_get_mock when editing overlays.

ParameterTypeDescription
filename *stringMock filename
scenariostring

mockifyer_list_override_groups

List scenario override groups and effective selection (default vs per-client lane). Pass clientId to see that lane’s choice.

ParameterTypeDescription
clientIdstringMOCKIFYER_CLIENT_ID / lane id
scenariostring

mockifyer_set_active_override_group

Set or clear an override group. With clientId, sets per-lane selection (does not change teammates). Without clientId, sets the scenario default only. Prefer lane scope for shared scenarios.

ParameterTypeDescription
groupId *string | nullOverride group id to activate, or null to clear
clientIdstringLane id — preferred for shared scenarios
scenariostring
scopestringlane = per clientId; default = scenario-wide fallback

mockifyer_upsert_override_group_entry

Create/update field overrides for one mock inside an override group. Use ensure=true to add an empty entry; clear=true to remove the entry.

ParameterTypeDescription
filename *stringScenario-relative mock filename
groupId *string
clearboolean
ensureboolean
overridesarray
scenariostring

mockifyer_put_override_group

Create or replace an override group document (id + label + optional entries).

ParameterTypeDescription
id *string
label *string
entriesarray
scenariostring

mockifyer_set_field_overrides

Set replay-time field overrides on a mock (overlay on stored response.data). Small payload — only path/value pairs, not the full response. Use mode "extend" to append/merge, or "remove" to delete an array index or object key.

ParameterTypeDescription
filename *stringMock filename
overrides *arrayField overrides to apply when the mock is served
clearbooleanWhen true, remove all field overrides
mergebooleanWhen true, append to existing overrides instead of replacing
scenariostring

mockifyer_copy_array_item

Clone an array item in response.data, apply optional field overrides on the clone, and persist. Use to add a booking copied from an existing one without sending the full response to the AI.

ParameterTypeDescription
arrayPath *stringPath to the array from response.data root, e.g. data.bookings or bookings
filename *stringMock filename
fromIndex *integerIndex of the item to clone
insertAtWhere to insert the clone (default append)
itemOverridesobjectFields to change on the clone only, e.g. { status: "CONFIRMED" }
scenariostring

mockifyer_set_mock_behavior

Set status override and/or response delay on a mock for error simulation and latency testing. Use statusOverride to simulate HTTP errors (e.g. 500, 429, 404) and responseDelayMs to add artificial latency. Pass null to clear an override.

ParameterTypeDescription
filename *stringMock filename
responseDelayMsDelay in milliseconds before returning response, or null to clear
scenariostringScenario name (defaults to active scenario)
statusOverrideHTTP status code to override (100-599), or null to clear

mockifyer_list_network_events

List recent network log hops (mock hits, upstream calls, proxy traffic). Use to find requestId/eventId before calling mockifyer_get_network_trace.

ParameterTypeDescription
clientIdstringFilter by client lane id
limitintegerMax events to return (default 200)
scenariostringScenario name (defaults to active scenario)
sincestringISO timestamp — only events after this time

mockifyer_get_network_trace

Resolve a multi-service call chain from the network log (gateway → downstream → external). Each hop may include request/response body previews when captureBodies is enabled.

ParameterTypeDescription
clientIdstringClient lane filter when scanning events
eventIdstringDashboard network log row id
limitintegerMax network events to scan when resolving the trace (default 5000)
requestIdstringX-Mockifyer-Request-Id from entry service (preferred lookup key)
scenariostringScenario name (defaults to active scenario)

mockifyer_explain_incident

Explain a crash or app incident with preceding network hops and heuristic suspects (weird 200s, GraphQL errors, mock misses).

ParameterTypeDescription
atstringISO timestamp anchor (defaults to latest incident)
clientIdstringClient lane filter
incidentIdstringDashboard incident row id from network log
limitintegerMax network events to scan
scenariostringScenario name (defaults to active scenario)
sessionIdstringSession id when incidentId is unknown
windowMsintegerLookback window in ms (default 60000)

mockifyer_get_network_log_config

Return network logging settings for a scenario (enabled, captureBodies). Traces include body previews only when captureBodies is true.

ParameterTypeDescription
scenariostringScenario name (defaults to active scenario)

mockifyer_list_entities

List fixture-pool entities (shared catalog of domain objects). Extract from recordings with mockifyer_extract_entity. Entities are inert until a future activation path; matching still uses normal scenario mock files. Endpoint slots are deferred.

ParameterTypeDescription
entityTypestring
qstringSearch id/label/entityType
tagstring

mockifyer_get_entity

Get one pool entity by id (includes usedInScenarios from scenario manifests).

ParameterTypeDescription
id *string

mockifyer_extract_entity

Extract entity data from a mock recording into the pool (jsonPath e.g. trips.0). Use extractAllArrayItems to create one entity per array element. Catalog only for now — does not change request matching.

ParameterTypeDescription
entityType *stringe.g. trip, user, booking
filename *string
jsonPath *stringDot path under response.data, e.g. trips.0
scenario *string
extractAllArrayItemsboolean
idstring
labelstring
tagsarray

mockifyer_fork_entity

Copy a pool entity to a new id (safe when you need scenario-specific edits without mutating the shared base).

ParameterTypeDescription
id *stringSource entity id
newId *stringNew entity id
labelstring

mockifyer_create_entity

Create a manual pool entity.

ParameterTypeDescription
entityType *string
id *string
label *string
data
tagsarray

mockifyer_delete_entity

Delete a pool entity. Fails with 409 if scenario manifests still reference it unless force=true.

ParameterTypeDescription
id *string
forcebooleanDelete even when referenced by scenario manifests

mockifyer_promote_response

Promote a full mock recording into a response fixture (whole HTTP payload escape hatch).

ParameterTypeDescription
filename *string
scenario *string
idstring
labelstring
tagsarray

mockifyer_list_response_fixtures

List full-response fixtures in the pool. Use with mockifyer_preview_pool_ref / mockifyer_set_pool_ref to activate via $pool refs.

mockifyer_preview_pool_ref

Preview resolving a promoted pool response with optional path + field/index select (document keeps envelope; value returns subtree).

ParameterTypeDescription
id *stringPool response fixture id
indicesarray
modestring
pathstringDot path into the pool response body
selectobject

mockifyer_set_pool_ref

Embed a $pool reference into a scenario mock response (entire body or at a JSON path). Serve-time resolve loads the promoted fixture.

ParameterTypeDescription
filename *stringMock filename relative to the scenario folder
pool *object
pathstring | nullPath within response.data to set; omit/null replaces entire response.data
scenariostring

mockifyer_get_atlas_doc

Atlas auto-doc map: screens, CMS pages, datasources, lastRequestIds. Default summary=true (compact). Join lastRequestId to network/mocks for response values. Live stream from /api/atlas — available before HTML generate.

ParameterTypeDescription
scenariostring
summarybooleanCompact projection (default true). Set false for full doc including props samples.

mockifyer_list_atlas_events

List live Atlas prefetch/presentation events (screen/CMS semantics). Not HTTP hops — use mockifyer_list_network_events for wire traffic.

ParameterTypeDescription
clientIdstring
kindstring
limitinteger
scenariostring
sessionIdstring

mockifyer_list_atlas_usage

List Atlas usage annotations (requestId → screen/component/CMS). Bridge from UI to network hops.

ParameterTypeDescription
scenariostring

mockifyer_list_atlas_sessions

List Atlas session ids for a scenario (from live event log).

ParameterTypeDescription
scenariostring

mockifyer_get_atlas_tree

CMS presentation tree for one Atlas session (nested by parentId) plus prefetch list.

ParameterTypeDescription
sessionId *stringAtlas session id from mockifyer_list_atlas_sessions
scenariostring

mockifyer_get_atlas_generated_status

Whether Atlas HTML generate output exists under mock-data/atlas-html (index.html, atlas.har, atlas-events.json, bodies-search.json) and body-search entry counts. Call after Dev Menu / mockifyer-atlas render.

mockifyer_list_atlas_generated_hops

List hops from atlas-events.json after generate (method/url/status/source + hasBodySearchText). Prefer this before searching bodies. When bodies are missing, use mockifyer_get_mock for mock-hit hops.

ParameterTypeDescription
limitinteger
onlyWithBodiesbooleanIf true, only hops present in bodies-search.json

mockifyer_search_atlas_bodies

Search Atlas-generated bodies-search.json (post-render payloads). Empty when captureBodies/spill was off at capture time — then use mockifyer_get_mock for recorded responses instead.

ParameterTypeDescription
q *stringSubstring to find in hop body text
includeHopbooleanAttach hop metadata from atlas-events.json (default true)
limitintegerMax hits (default 25)

mockifyer_get_atlas_hop_body

Get generated body text for one Atlas hop id (from bodies-search.json and spill files). Requires prior Atlas generate with bodies captured.

ParameterTypeDescription
eventId *stringHop id from mockifyer_list_atlas_generated_hops or body search
maxCharsintegerTruncate body text (default 32000)

mockifyer_explain_value

Explain where a response value comes from in one call: origin (mock file, request), what modified it (field/date/lane overrides), original vs effective value, hop chain from traces, and sibling fields. Use to answer "why does the app show this value?" without chaining multiple tools.

ParameterTypeDescription
clientIdstringClient lane filter
fieldPathstringDot path to the field in response.data (e.g. temperature_2m or trips.0.status)
pathstringPath to search for when URL is not provided
requestIdstringX-Mockifyer-Request-Id from the response (preferred lookup key)
scenariostringScenario name (defaults to active scenario)
urlstringURL or path to search for (e.g. /api/discover?destinationKey=atlantis)
valueExpected value to verify (e.g. -999 or "CONFIRMED")