MCP Server

Tool reference

Every tool the GTM Engine MCP server exposes, with inputs, required permissions, and what each returns.

The GTM Engine MCP server exposes 53 tools. All tool names start with gtm_ so they're easy to spot alongside tools from other servers.

You normally don't call these yourself. Your assistant picks them based on what you ask. This reference is for understanding what the assistant can do, debugging, and writing precise prompts.

How tools behave

  • Permission-filtered. Your client only sees tools your GTM Engine role allows. The Requires column lists the permission for each tool. See Permissions and security.
  • Annotated. Read tools are marked read-only. Write tools are marked as modifying data, so most clients ask for confirmation before running them.
  • Scoped to your organization. Every call runs against the organization you signed in to.
  • JSON results. Each tool returns its result as JSON text. Errors come back as a tool error with a short message, for example Account not found. or Insufficient permissions for MCP tool.
  • Pagination. List and search tools take limit (1–100, default 25) and offset (default 0). List tools return no total count: if a page comes back with fewer than limit results, it's the last page. Search tools return the total under pagination.total.
  • IDs are UUIDs. Dates are ISO 8601.

Searching records

gtm_search_accounts, gtm_search_contacts, and gtm_search_opportunities share one input shape and filter on any default or custom field.

InputTypeNotes
filters{ field, operator, value }[]Conditions that must all match
or_filters{ field, operator, value }[][]Groups of alternatives. A record must match at least one condition in every group.
querystringPlain-language description of the records to find. Uses credits on every call.
searchstringFree-text match on the record's main name fields
sort{ field, direction }Defaults to created_at descending
limit, offsetnumber1–100 (default 25), and 0 by default

field is a field key. Use gtm_list_fields to find custom field keys. An unknown field is rejected rather than ignored.

OperatorMeaningValue
eq, neqEquals, does not equalSingle value
gt, gte, lt, lteComparisons for numbers and datesSingle value
ilike, likeContains (case-insensitive, case-sensitive)Text
in, notin, not_in_or_nullMatches any, or none, of a list. not_in_or_null also matches empty values.Array
null, notField is empty, is not emptyNone
in_last, in_next, not_in_lastRelative date windowDuration: 30d, 2w, 3m, 1q

Returns { data, pagination: { limit, offset, total } }. When query is used, the result also includes interpretation: an explanation plus the filters and or_filters the query was translated into, so the assistant can reuse them without spending more credits. Assistants can usually build filters themselves, so query is rarely needed over MCP.

Campaigns

ToolWhat it doesRequires
gtm_list_campaignsList campaignsCampaigns: read
gtm_get_campaignGet one campaign with its stepsCampaigns: read
gtm_create_campaignCreate a campaign, optionally with its stepsCampaigns: write
gtm_update_campaignUpdate a campaign's settings or statusCampaigns: write
gtm_enroll_campaign_contactsEnroll contacts in a campaignCampaigns: write
gtm_enroll_campaign_accountsEnroll the contacts at accounts, optionally finding new contacts and routing between campaignsCampaigns: write, Pipeline generation: write, Accounts: read all
gtm_list_campaign_target_personasList saved contact Target PersonasCampaigns: read
gtm_list_campaign_enrollmentsList who is enrolled in a campaign, with status and progressCampaigns: read, Contacts: read all
gtm_send_campaign_step_testSend one email step as a testCampaigns: write, Contacts: read all
gtm_remove_campaign_contactsRemove contacts or accounts from a campaignCampaigns: write
gtm_create_campaign_stepAdd a step to a campaignCampaigns: write
gtm_update_campaign_stepEdit a campaign stepCampaigns: write
gtm_delete_campaign_stepDelete a campaign stepCampaigns: write
gtm_list_campaign_sending_inboxesList sending inboxes and whether each can send a campaign typeCampaigns: read
gtm_get_campaign_performanceGet detailed performance for one campaignCampaigns: read
gtm_list_campaign_performanceGet summary performance for up to 200 campaignsCampaigns: read
gtm_list_campaign_email_templatesList reusable email templatesCampaigns: read
gtm_get_campaign_email_templateGet one email template with its bodyCampaigns: read
gtm_create_campaign_email_templateCreate a reusable email templateCampaigns: write
gtm_update_campaign_email_templateEdit, activate, or archive an email templateCampaigns: write

System-managed campaigns (such as one-off sends created inside the app) aren't returned, editable, or reported on through MCP.

gtm_list_campaigns

InputTypeNotes
statusdraft | active | paused | archivedOptional filter
limit, offsetnumberPagination

Returns an array of campaigns with id, name, description, campaign_type, status, sending_provider, send/suppression/enrichment configuration, tracking flags, and timestamps.

gtm_get_campaign

InputTypeNotes
idUUIDCampaign ID

Returns the campaign plus its steps, linked trigger_campaigns, and created_by_user.

gtm_create_campaign

InputTypeNotes
namestringRequired. 1–255 characters
campaign_typestringRequired. For example cold_outbound, warm_outbound, inbound, newsletter
statusdraft | activeDefaults to draft. active turns the campaign on right away and requires at least one step.
stepsobject[]Optional, up to 100. Same fields as gtm_create_campaign_step (except parent_connect_step_id), each with a unique step_number
Other settingsSame fields as gtm_update_campaign's data (description, sending_provider, provider_config, send_config, and so on)

A typical flow is: list sending inboxes, create the campaign as a draft with its steps, review it with gtm_get_campaign, set status to active with gtm_update_campaign, then enroll contacts.

The campaign and its steps are saved together: if anything fails, nothing is created. Pinned sending inboxes in provider_config.inbox_ids must be eligible for the campaign type. Unless you set them, include_unsubscribe_link defaults to on for marketing types (newsletter, consideration, lifecycle, pre- and post-event) and auto_remove_on_reply defaults to on. The campaign is attributed to you. Returns the campaign with its steps, like gtm_get_campaign.

gtm_update_campaign

InputTypeNotes
idUUIDCampaign ID
data.namestring1–255 characters
data.descriptionstringUp to 2,000 characters
data.statusdraft | active | paused | archivedUse to launch, pause, or archive
data.campaign_typestringFor example cold_outbound, warm_outbound, inbound
data.sending_providerstringFor example gtm_native, instantly, salesloft
data.send_configobjectWhen emails may go out: timezone (IANA name, default UTC), allowed_days (default Monday–Friday), time_windows of { start, end } in 24-hour HH:MM (default 08:00–18:00)
data.suppression_configobject | nullSuppression rules
data.enrichment_configobject | nullJust-in-time enrichment settings
data.newsletter_configobject | nullNewsletter settings
data.provider_configobjectSender settings, merged into the existing config. inbox_ids: sending inbox IDs from gtm_list_campaign_sending_inboxes (omit to use every eligible inbox). delivery_type: "direct_connected" with direct_user_ids: send from those users' connected Gmail or Outlook mailboxes instead. review_all_emails: hold every email for approval in the app. Server-managed keys can't be changed.
data.include_unsubscribe_link, data.auto_remove_on_reply, data.track_opens, data.track_clicksbooleanToggles

Only the fields you include are changed. Returns the updated campaign. An update that pins sending inboxes which are missing or not eligible for the campaign type is rejected.

gtm_enroll_campaign_contacts

InputTypeNotes
idUUIDCampaign ID
data.contactIdsUUID[]1–500 contact IDs
data.allowReEnrollmentbooleanRe-enroll contacts who were previously in this campaign
data.excludeActiveInOtherCampaignsbooleanSkip contacts currently active in another campaign
data.startAtISO datetimeSchedule when the enrollment starts

Returns { message, enrolled, skipped, startAt }. skipped lists each contact that wasn't enrolled with a reason, so the assistant can tell you why.

gtm_enroll_campaign_accounts

InputTypeNotes
idUUIDCampaign ID. The campaign must be active.
data.accountIdsUUID[]1–200 account IDs
data.includeExistingContactsbooleanEnroll the contacts already linked to each account. Defaults to true.
data.personaIdsUUID[]Up to 20 Target Persona IDs from gtm_list_campaign_target_personas. New contacts matching them are found at each account, imported, and enrolled. Spends credits. Outreach-builder campaigns only.
data.maxContactsPerAccountinteger1–50, default 5. Outreach-builder campaigns only.
data.excludeActiveInOtherCampaignsbooleanSkip contacts currently active in another campaign
data.allowReEnrollmentbooleanFor campaigns created through the API or MCP: re-enroll contacts who already finished the campaign
data.routingobjectTurns on campaign routing: each contact goes to the best-fitting campaign, with this campaign as the fallback. candidateCampaignIds (up to 50) limits the candidates; omit it to consider every live Outreach-builder campaign. Outreach-builder campaigns only.

What happens depends on how the campaign was made:

  • Campaigns built in the Outreach builder run the same background job the app uses when you enroll accounts, one per account. Only non-customer accounts whose sales status is lead or working are eligible. The call returns straight away with mode: "background_job", a batchId, and accountsQueued; contacts are enrolled as the jobs finish, and progress shows in the app.
  • Campaigns created through the API or MCP enroll each account's existing contacts immediately and return mode: "direct" with enrolled and skipped. personaIds, maxContactsPerAccount, and routing are rejected for these campaigns, and at most 500 contacts can be enrolled per call.

Either way, ineligibleAccounts lists every account that was skipped with a reason (not_found, customer, or sales_status_not_lead_or_working).

gtm_list_campaign_target_personas

No inputs. Returns the organization's contact Target Personas (saved contact filters such as job titles and seniority) as { id, name, description, products }. Use the IDs as personaIds in gtm_enroll_campaign_accounts. Personas are created and edited in the app.

gtm_list_campaign_enrollments

InputTypeNotes
idUUIDCampaign ID
statusstringOnly enrollments in this status, e.g. scheduled, enrolled, active, paused, completed, bounced, unsubscribed, failed
contactIdsUUID[]Up to 100 contacts to check on
limitinteger1–200, default 50
offsetintegerDefault 0

Returns the campaign's roster, newest first. Each entry has status, currentStepNumber (the last step reached), nextSendAt, enrolledAt, scheduledAt, updatedAt, and the contact's name and email. pausedReason says why sending is on hold or was skipped, for example missing_email, invalid_email, out_of_office, or campaign_paused. Use it after enrolling to confirm contacts are in, or with contactIds to find out why someone hasn't received an email. Contacts enrolled through an account enrollment job appear as their job finishes.

gtm_send_campaign_step_test

InputTypeNotes
idUUIDCampaign ID
stepIdUUIDStep ID from gtm_get_campaign. Must be an email step.
data.contactIdUUIDContact whose data fills the template. They don't receive the email.
data.recipientEmailstringWhere to deliver the test. Defaults to your own email address; otherwise it must be an active user in your organization.

Renders the step exactly as a real send would (template variables, AI-written content, tracking and unsubscribe settings) and delivers it to you instead of the contact. It works on draft campaigns, so you can check an email in a real inbox before turning the campaign on. Nothing is recorded against the contact. The test goes out from one of the campaign's sending inboxes and counts toward that inbox's daily limit. A step that replies in the previous email's thread is sent with a simulated "Re:" subject, and the result says so. Returns { status, recipientEmail, mailboxId, replyContextSimulated, warning }.

gtm_remove_campaign_contacts

InputTypeNotes
idUUIDCampaign ID
data.contactIdsUUID[]Up to 500 contacts to remove
data.accountIdsUUID[]Up to 200 accounts. Every contact linked to these accounts is removed.

Provide contactIds, accountIds, or both. Removal works like Stop on the campaign's roster: a contact whose enrollment hasn't started yet is cancelled, and an active contact is ended with their remaining steps skipped. Contacts who aren't active in the campaign are ignored, so the call is safe to repeat. It works on paused campaigns, but not on scheduled (newsletter) campaigns. Returns { removed, contactIds } listing the contacts actually removed. A removed contact can be enrolled again with allowReEnrollment.

gtm_create_campaign_step

InputTypeNotes
idUUIDCampaign ID
data.step_numbernumberRequired. Position in the sequence, starting at 1. Must be unique in the campaign.
data.step_typemessage | enroll_campaign | create_taskDefaults to message
data.channelemail | linkedin_dm | linkedin_inmail | smsDefaults to email
data.content_typeliquid_template | ai_generated | html | hybrid | template_libraryDefaults to liquid_template
data.subject_template, data.contentstring | nullSubject and body. Both support Liquid variables such as {{ contact.first_name }}, {{ contact.company }}, {{ contact.custom.<field_key> }}, {{ account.name }}, {{ user.name }}, and {{ system.unsubscribe_url }}.
data.ai_promptstring | nullInstructions for writing the body when content_type is ai_generated (content is ignored)
data.hybrid_configobject | nullSections for hybrid content. For template_library: { templateIds, tags, tagMatchMode, fallbackTemplateId, selectorInstructions } with at least one of templateIds or tags (see gtm_list_campaign_email_templates)
data.body_formathtml | plain_textEmail body format
data.email_thread_modenew_thread | reply_to_previousWhether the email replies in the previous step's thread
data.delay_minutesnumberMinutes to wait after the previous step (for step 1, after enrollment) before this step is scheduled. Defaults to 0. The send then waits for the next allowed send window.
data.target_campaign_idUUID | nullCampaign to enroll into, for enroll_campaign steps
data.parent_connect_step_idUUID | nullThe LinkedIn connection step in this campaign that this step follows
data.task_assigneerecord_owner | mailbox_ownerWho gets the task, for create_task steps

Returns the created step. Attachments can't be added through MCP yet.

Campaigns built from a workflow (in Outreach) get their steps from the workflow, which overwrites them on every publish. Step tools reject those campaigns: edit the workflow instead. On a live campaign, the same rules apply as editing in the app: content changes are used by every send that hasn't gone out yet, but contacts already enrolled keep the steps and timing they were scheduled with when they enrolled. New steps and delay changes apply to contacts enrolled afterwards.

gtm_update_campaign_step

InputTypeNotes
idUUIDCampaign ID
stepIdUUIDStep ID (from gtm_get_campaign)
dataobjectAny gtm_create_campaign_step fields to change

Only the fields you include are changed. Returns the updated step.

gtm_delete_campaign_step

InputTypeNotes
idUUIDCampaign ID
stepIdUUIDStep ID

Deletes the step, any LinkedIn steps that depend on it, and the step's send history. This can't be undone. Returns { id, deleted: true }.

gtm_list_campaign_sending_inboxes

InputTypeNotes
campaign_typestringOptional. Campaign type to check eligibility for. Marketing-domain inboxes are only eligible for newsletter.

Returns the organization's sending inboxes with id, email_address, display_name, status, daily_send_limit, user_id, domain, domain_purpose, eligible, and ineligible_reason (for example "Warming" or "Domain DNS failing"). Put the id of eligible inboxes in a campaign's provider_config.inbox_ids. Inboxes are set up in Campaign Engine → Sending; they can't be created through MCP.

gtm_get_campaign_performance

InputTypeNotes
idUUIDCampaign ID
startDatedate or ISO datetimeOptional. Only limits the daily series.

Returns the same numbers as the campaign's analytics page:

  • enrollments and removed: totals by status and by removal reason (reply, bounce, unsubscribe).
  • enrollmentLifecycle: completed, in-flight, scheduled, awaiting-review, and invalid-email counts for contacts and accounts.
  • sends: totals by send status.
  • engagement: sent, delivered, opened, clicked, replied, bounced, and unsubscribed counts, unique-contact counts, rates and uniqueRates (percent of sends), and reply classifications (positive, negative, out of office).
  • daily, steps, and topLinks: activity by day, by step, and the most-clicked links.

gtm_list_campaign_performance

InputTypeNotes
idsUUID[]1–200 campaign IDs

Returns an object keyed by campaign ID with sent, uniqueOpened, uniqueReplied, uniqueBounced, and positiveReplies. Campaigns with no sends yet, and IDs that aren't campaigns in your organization, are left out.

gtm_list_campaign_email_templates

InputTypeNotes
qstringOptional. Search text matched against title, description, subject, body, and tags
statusdraft | active | archived | allOptional. Draft and active templates are returned when omitted
tagsstring[]Optional. Up to 24 tags to filter by
tag_match_modeany | allWith tags: match any tag (default) or every tag
folder_pathstringOptional. Only templates in this folder or its subfolders
limit, offsetnumberPagination. limit defaults to 50, at most 200

Returns the reusable templates in the Email templates library, most recently updated first. Each entry has id, title, description, subject_template, body_format, status, tags, folder_path, and timestamps. Bodies are left out to keep the list small; read one with gtm_get_campaign_email_template.

gtm_get_campaign_email_template

InputTypeNotes
idUUIDTemplate ID

Returns the template, including its body.

gtm_create_campaign_email_template

InputTypeNotes
titlestringRequired. Up to 200 characters
descriptionstring | nullWhat the template is for. Template library steps read it when picking a template for a contact.
subject_templatestringEmail subject. Supports Liquid variables and spintax.
bodystringEmail body: email-safe HTML or raw text, depending on body_format. Supports Liquid variables and spintax.
body_formathtml | plain_textDefaults to html
statusdraft | active | archivedDefaults to draft
tagsstring[]Up to 24 tags
folder_pathstring | nullFolder in the library, for example Outbound/Follow-ups

Returns the created template. Only active templates are picked by campaign steps, so set status to active when the template should be used. To send it, add a campaign step with content_type: "template_library" and hybrid_config: { templateIds: [id] } (or tags). The template is attributed to you.

gtm_update_campaign_email_template

InputTypeNotes
idUUIDTemplate ID
dataobjectAny of the gtm_create_campaign_email_template fields

Only the fields you include are changed; tags replaces the whole tag list. Set data.status to archived to retire a template. Returns the updated template. Campaigns that use the template pick up the change on their next send.

Accounts

ToolWhat it doesRequires
gtm_list_accountsList accountsAccounts: read all
gtm_search_accountsSearch accounts by any default or custom fieldAccounts: read all
gtm_get_accountGet one accountAccounts: read all
gtm_create_accountCreate an accountAccounts: write all
gtm_update_accountUpdate an accountAccounts: write all
gtm_upsert_accountCreate or update an account matched by domainAccounts: write all

List filters: domain, tags (comma-separated; matches accounts with any of the tags), limit, offset. For anything else, use gtm_search_accounts. See Searching records.

Account fields (create, update, upsert):

FieldTypeNotes
account_namestringRequired on create and upsert
domainstringRequired on upsert, where it's the match key
linkedin_url, address, city, state, countrystring
relationship_typeprospect | customer | partner | investor
sales_statuslead | not_qualified | working | pipeline | renewal_growth | closed_lost | churned
icp_labelstring
tagsstring[]
custom_fieldsobjectSee Custom field values

gtm_update_account takes { id, data }, where data holds only the fields to change. gtm_upsert_account returns { data, created }, where created is true if a new account was made.

Contacts

ToolWhat it doesRequires
gtm_list_contactsList contactsContacts: read all
gtm_search_contactsSearch contacts by any default or custom fieldContacts: read all
gtm_get_contactGet one contactContacts: read all
gtm_create_contactCreate a contactContacts: write all
gtm_update_contactUpdate a contactContacts: write all
gtm_upsert_contactCreate or update a contact matched by emailContacts: write all

List filters: email, tags (comma-separated), limit, offset. For anything else, use gtm_search_contacts. See Searching records.

Contact fields (create, update, upsert):

FieldTypeNotes
first_name, last_namestringRequired on create and upsert
emailstringRequired on upsert, where it's the match key. Stored lowercase.
middle_name, title, phone, company, linkedin_url, location, city, state, country, icp_labelstring
tagsstring[]
account_idsUUID[]Accounts to associate. New associations are added; existing ones are kept.
custom_fieldsobjectSee Custom field values

gtm_update_contact takes { id, data }. gtm_upsert_contact returns { data, created }.

Opportunities

ToolWhat it doesRequires
gtm_list_opportunitiesList opportunitiesOpportunities: read all
gtm_search_opportunitiesSearch opportunities by any default or custom fieldOpportunities: read all
gtm_get_opportunityGet one opportunityOpportunities: read all
gtm_create_opportunityCreate an opportunityOpportunities: write all
gtm_update_opportunityUpdate an opportunityOpportunities: write all

List filters: account_id, limit, offset. For anything else, use gtm_search_opportunities. See Searching records.

Opportunity fields:

FieldTypeNotes
opportunity_namestringRequired on create
account_idUUIDRequired on create
amountnumber
close_datestringDate (2026-12-31) or full ISO datetime
stage_idUUIDDefaults to the first stage of your default pipeline on create. Use gtm_list_stages to find IDs.
pipelinestringPipeline name
tagsstring[]
custom_fieldsobjectSee Custom field values

gtm_update_opportunity takes { id, data }.

Pipelines and stages

ToolWhat it doesRequires
gtm_list_pipelinesList pipelinesOpportunities: read all
gtm_get_pipelineGet one pipelineOpportunities: read all
gtm_list_stagesList stagesOpportunities: read all
gtm_get_stageGet one stageOpportunities: read all

Pipeline filters: active, limit, offset. Stage filters: pipeline_id, active, limit, offset.

Assistants typically call these to turn a stage name like "Discovery" into the stage_id needed to create or move an opportunity.

Users

ToolWhat it doesRequires
gtm_list_usersList users in your organizationUsers: manage
gtm_get_userGet one userUsers: manage

List filters: email, limit, offset. Useful for resolving an owner by name or email before logging an activity.

Fields

ToolWhat it doesRequires
gtm_list_fieldsList field definitionsFields: manage
gtm_upsert_fieldCreate or update a custom field definitionFields: manage

gtm_list_fields

InputTypeNotes
record_typeaccounts | contacts | opportunitiesOptional filter
custom_only"true" | "false"Only return custom fields

Returns each field's key, display_name, description, data_type, enum_values, and is_custom. Assistants call this to learn which custom_fields keys exist before writing records.

gtm_upsert_field

InputTypeNotes
record_typeaccounts | contacts | opportunitiesRequired
keystringRequired. Lowercase letters, digits, and underscores, starting with a letter, up to 63 characters. This is the key used in custom_fields.
display_namestringRequired
descriptionstring
data_typetext | numeric | boolean | date | timestamp with time zone | enum | multi-selectRequired
enum_valuesstring[]Options for enum and multi-select. On update, new options are merged in; existing options are never removed.

If a field with the same record_type and key exists, it's updated. Otherwise it's created.

Activities

Activities are everything on a record's timeline: meetings and recorded calls, emails, notes, form submissions, and more.

ToolWhat it doesRequires
gtm_list_activitiesList activities, newest first, with filtersActivities: read all
gtm_get_activityGet one activity by ID, with full content and call detailsActivities: read all
gtm_get_activity_transcriptRead the transcript text of a recorded meeting or callActivities: read all
gtm_create_activityLog a custom activity on contacts and/or opportunitiesActivities: write all

gtm_list_activities

InputTypeNotes
account_idUUIDActivities linked to the account through its contacts or its opportunities
contact_idUUIDActivities associated with the contact
opportunity_idUUIDActivities associated with the opportunity
owner_idUUIDActivities owned by the user
interaction_typestringOne type, such as meeting, phone_call, email, or note
has_transcriptbooleantrue for activities with a call transcript, false for those without
after, beforeISO datetimeDate range on the activity's date
limit, offsetnumberPage size (default 25, max 100) and offset

Each activity includes its content, type, date, owner, tags, and the IDs of its contacts and opportunities. In list results, content longer than 1,000 characters is shortened and flagged with content_truncated; gtm_get_activity returns it in full.

Activities that have a call transcript also include a meeting object with the transcript_id, title, call_type, participants, topics, and the AI-generated summary. Other activities have meeting: null.

gtm_get_activity

Takes the activity id. This is the same ID that appears in an activity link from the app, so you can paste a link like app.gtmengine.ai/records/activities/<id> and ask about it.

Returns the activity with its full content. For calls with a transcript, meeting additionally includes call_url, objections, call_score, and call_score_reasoning.

gtm_get_activity_transcript

InputTypeNotes
idUUIDRequired. The activity ID.
offsetnumberCharacter position to start from. Defaults to 0.
limitnumberMaximum characters to return. Defaults to the maximum, 50,000.

Returns the transcript text along with title, date_time, participants, total_length, and next_offset. Long calls come back in parts: when next_offset isn't null, the assistant calls the tool again with it as offset to read the rest. Returns a not-found error if the activity has no transcript.

Restricted calls

These tools respect your organization's call visibility settings. A call you aren't allowed to view in the app comes back with restricted: true, its content replaced by "Restricted call", and no linked records or meeting details. Its transcript can't be read.

Restricted calls are also left out of any gtm_list_activities result that filters by account_id, contact_id, opportunity_id, or has_transcript, so those filters can't be used to work out which records a restricted call is linked to or whether it was recorded.

gtm_create_activity

InputTypeNotes
contentstringRequired. The activity body, such as a call note.
interaction_typestringDefaults to custom. Examples: note, phone_call, email, meeting, linkedin_message, event_attendance, demo_request.
contact_idsUUID[]Contacts to attach the activity to
opportunity_idsUUID[]Opportunities to attach the activity to
directioninbound | outbound
date_timeISO datetimeDefaults to now
owner_idUUIDUser who owns the activity
sourcestringCustom source label, such as claude
tagsstring[]
processbooleanSet to true to have GTM Engine re-process each attached contact and opportunity so their fields reflect the new activity. Needs at least one contact or opportunity, and at most 25 in total.
external_idstringIdempotency key, up to 255 characters. If an activity with this ID already exists, it's returned instead of creating a duplicate, and any new associations are added.

Use this to bring in conversations GTM Engine didn't capture itself, such as a text message thread or notes from a call that wasn't recorded: put the text in content, pick the matching interaction_type (for example text_message or phone_call), and set process to true. The result then includes a processing object listing each record that was queued. Processing is skipped when a repeated external_id returns an existing activity.

Activities show up on the record's activity timeline in GTM Engine.

Files

Files live in the Content Library and can be attached to accounts and opportunities, where they appear alongside files uploaded in the app.

ToolWhat it doesRequires
gtm_list_filesList or search files, optionally only those attached to a recordContent library: read
gtm_get_fileRead one file: summary, attached records, download link, and extracted textContent library: read
gtm_upload_fileUpload a file, optionally attaching it to a recordContent engine: write
gtm_attach_fileAttach an existing file to a recordContent engine: write

Whenever a call names a record, it also requires Accounts: read all or Opportunities: read all for that record's type.

gtm_list_files

InputTypeNotes
record_type, record_idaccounts | opportunities, UUIDReturn the files attached to this record. Provide both or neither. Without a record, only the shared Content Library is searched.
searchstringMatches title, description, tags, filename, and extracted text
limitnumber1–100, default 25. There is no offset; narrow with search instead.

List results leave out extracted text. Use gtm_get_file to read a file.

gtm_get_file

InputTypeNotes
idUUIDFile ID

Returns the file's title, summary, tags, the records it's attached to, and for each stored file a signed download_url, extracted_text_status, and extracted_text (the first 20,000 characters). Text is extracted from Word, PowerPoint, Excel, and text-based files. For other formats, such as PDFs and images, extracted_text_status is unavailable and the assistant has the summary and download link to work with.

gtm_upload_file

InputTypeNotes
filenamestringRequired. Include the extension, which sets the file type.
contentstringFile content as plain text. Use for Markdown, plain text, CSV, HTML, and JSON.
content_base64stringFile content as base64. Use for PDF, DOCX, PPTX, XLSX, and images. Provide exactly one of content and content_base64.
mime_typestringDefaults to a type inferred from the filename
titlestringDefaults to an AI-generated title, or the filename without its extension
tagsstring[]Up to 24
record_type, record_idaccounts | opportunities, UUIDAttach the file to this record. Provide both or neither. Without a record, the file is added to the shared Content Library.

The file is summarized and tagged on upload, the same as files uploaded in the app. Files can be up to 3 MB. Upload larger files in the app.

gtm_attach_file

InputTypeNotes
idUUIDFile ID, from gtm_list_files or gtm_upload_file
record_type, record_idaccounts | opportunities, UUIDRecord to attach the file to

A file can be attached to several records. Attaching it to the same record twice has no effect.

Custom field values

Records accept a custom_fields object keyed by field key:

{
  "custom_fields": {
    "contact_type": "User",
    "onboarding_checklist": ["Invite Accepted", "First Login"],
    "nps_score": null
  }
}
  • Multi-select fields take an array of options. A single string is treated as a one-option array.
  • Pass null to clear a value.
  • Unknown keys are rejected. Call gtm_list_fields to see valid keys, or gtm_upsert_field to create one first.

The same tools and schemas back the REST API. For the exact response schemas, see the API reference for the matching endpoint.

On this page