Skip to main content
Glama
zackscriven

ghl-mcp-server-v2

by zackscriven

ghl_workflow_get_logs

Read-onlyIdempotent

List a workflow's step-by-step execution history, newest first, to see who entered, what each step did, and which steps failed and for which contacts.

Instructions

WORKFLOW API — limited availability: enabled for selected sub-accounts only; others get 403 WORKFLOW_API_NOT_ENABLED_FOR_LOCATION (not a token or scope problem). Suggested order: get step types -> build the definition -> validate (validate_workflow_definition, read-only) -> create (always lands in draft) -> publish via update status. Rate limits: integration daily quota + 10s burst (X-RateLimit-* headers) AND a per-sub-account budget per 10s window with reads and writes counted separately; no Retry-After is sent. Logs: default and max range 30 days; retained 60 days. Get Workflow Logs Limited availability. The workflow API is currently enabled for selected sub-accounts only; any other sub-account receives 403 WORKFLOW_API_NOT_ENABLED_FOR_LOCATION.

List the step-by-step execution history of one workflow, newest first. Each record is one step of one run for one contact or record, with its outcome and timing. It answers who and what: who entered, what happened to a contact, which steps failed and for whom. To answer how many, use Get Workflow Log Statistics.

Before you call it. Get workflowId from Search Workflows. Never pass a workflow name. To see what each step is, call Get Workflow Definition: its actions[].id matches stepId here.

Step details. meta says how the contact entered, why a step was skipped or failed, what a step did, whether a wait timed out, and why the contact left. A key is left out when it does not apply. Only the keys documented under meta are returned. New keys may be added later (see Compatibility).

Paging. The response holds logs, their count, and nextCursor. The first call (action=first, the default) returns the newest page. For the next (older) page, send action=next with referenceId and referenceCreatedAt from nextCursor, unchanged, and keep the same filters and dates. nextCursor is null when there are no more records. A cursor that does not match returns 422. A page holds at most 100 records, 15 by default.

Dates. Send startDate and endDate together (ISO 8601, UTC, at most Endpoint: GET /workflows/{workflowId}/logs (Version header: v3; source: v3/workflows-v3.json) OAuth scopes: workflows.logs Pagination params: limit — pass them to page through full result sets.

Input Schema

NameRequiredDescriptionDefault
limitNoRecords per page, 1 to 100. Default 15
typesNoOnly steps of this type: a step `type` key, as listed by Get Step Types or in `actions[].type` of Get Workflow Definition, for example `email`. One type per call on this route. `drip` also matches `drip_queued` and `drip_resume`, and `if_else` also matches `condition`. New values can appear
actionNo`first` returns the newest page, which can also start with steps that are still running. `next` returns the next (older) page, starting at the record in `nextCursor`, and requires `referenceId` and `referenceCreatedAt`. Defaults to `first`first
endDateNoEnd of the range, ISO 8601. A plain date includes the whole day. At most 30 days after startDate. Defaults to now
recordIdNoOnly logs for one record, in workflows that run on records (opportunities, custom objects and so on) instead of contacts. Use the `recordId` of a record. Send it with recordType
statusesNoOnly steps with these outcomes (the `status` field). Repeat the parameter or send a comma-separated list. Values: `added_to_workflow` (the contact entered the workflow), `success` (the step ran), `error` and `failed` (the step did not complete), `failed_retry_limit_reached` (the step gave up after its retries), `retry` (the step will run again), `skipped` (the step did not run, for example because of DND, a time window or missing data), `waiting` (the contact is waiting at the step), `wait_finished` (a wait ended), `finished` (the contact left the workflow, see removedReason), `paused_due_to_draft_mode` (the workflow was unpublished while the contact was in it), `contact_merged` (the contact was merged into another contact), `drip_queued` (the contact is waiting in a drip step for its batch), `drip_resume` (the batch was released and the contact moved on), `processing` (the step has started and has not finished yet), and `winner_declared` (an A/B test step picked its winning path; the record has no contact). For every kind of failure, send `error`, `failed` and `failed_retry_limit_reached`. New values can appear
contactIdNoOnly logs for this contact. Use the `contactId` of a record
startDateNoStart of the range, ISO 8601: a plain date (start of that day, UTC) or a full timestamp. Send it together with endDate. Defaults to 30 days ago. Logs are available for the last 60 days, so it cannot be earlier than that
locationIdYesSub-account (location) ID. It must be the sub-account the token belongs to, otherwise the request is refused with 403
recordTypeNoObject type of recordId. Use the `recordType` of the same record. Values: `contact`, `opportunity`, `task`, `business`, `inbound_webhook`, or `custom_objects.<object key>` for a custom object, for example `custom_objects.cars`. New values can appear
workflowIdYesWorkflow ID. Get it from Search Workflows. Never pass a workflow name
executionIdNoOnly the steps of one execution: one run of the workflow for one contact or record. Use the `workflowStatusId` of any record from that run
referenceIdNo`nextCursor.referenceId` from the previous response. Required with `next`
referenceCreatedAtNo`nextCursor.referenceCreatedAt` from the previous response, sent unchanged. Required with `next`

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.0

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the read-only annotations, the description discloses limited-availability 403 behavior, rate-limit structure, 60-day retention, 30-day max range, cursor mismatch 422, and what the meta field can explain. This is exactly the kind of operational context annotations do not provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core tool guidance is well structured and front-loaded, but the opening workflow-API preamble includes creation/publish sequencing and repeats the limited-availability warning, which are not directly relevant to reading logs. The description is useful but noticeably bloated for a read-only list operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description still explains the response shape (logs, count, nextCursor), meta behavior, paging flow, date constraints, retention limits, and key error conditions. An agent has enough information to call and page through the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 14 parameters thoroughly. The description adds some operational framing around action, dates, and cursors, but most parameter-level meaning is already present in the schema, making 3 the appropriate baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: list the step-by-step execution history of one workflow, newest first. It also distinguishes the tool from its closest sibling by saying that Get Workflow Log Statistics answers "how many" while this tool answers "who and what."

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit prerequisites and alternatives: get workflowId from Search Workflows, never pass a workflow name, use Get Workflow Definition to resolve stepId, and use Get Workflow Log Statistics for counts. It also spells out date-range and cursor-paging rules, leaving little to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools