Skip to main content
Glama

Add contacts to an import draft

flow_import_contacts

Imports contacts from a file or list the user shares: read its rows and send them here, as columns (named once) and rows (arrays of values in that order), which is about half the writing of contacts objects. Send as many rows per call as fit, up to the limit below, rather than small parts. Before the first call, ask the user which country the numbers are from, suggesting the country most of them appear to be from; send it as defaultCountry. Adds up to 5,000 contacts per call to an import draft; nothing is imported until flow_commit_contact_import. The first call starts the draft and sets defaultCountry (required), groupIds and keepContactsWithInvalidDetails; later calls pass the draftId it answered and only the rows (or contacts). Every row carries the same fields as the first (phoneNumber, plus any of firstName, lastName, email). Keep each call under about 900 KB of JSON (about 5,000 short rows); send fewer rows when they are long. Each row is checked as it arrives: invalid rows are listed by their index in the call and left out, and a row whose number the draft already holds replaces the earlier row (the last one sent wins). A draft holds up to 100,000 contacts and 20 MB (the Flow API's body limit; the answer says how much is left), and expires 2 hours after its last call, 24 hours after its first at most. A brand may have 3 drafts holding contacts; flow_discard_contact_import drops one. Whether a number or email is valid is decided after the commit, as for a file upload. When you can run code with network access, flow_start_contact_import sends a file of more than a few hundred rows in one request instead; use this tool if that request cannot reach the link.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "flow_import_contacts"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowsNoOne array per contact, values in the order of columns, null for an empty one, such as ["+385911234567", "Ana"]
brandIdNoThe id of the brand this change is for: the active brand (flow_whoami). Required when the connection covers several brands; the change is refused when another brand is active.
columnsNoThe fields of each row, in order; phoneNumber required
draftIdNoLeft out on the first call; then the draftId the first call answered
contactsNoThe same rows as objects; send columns and rows instead
groupIdsNoFirst call only: groups every contact joins, ids from flow_list_groups
defaultCountryNoFirst call only: ISO 3166-1 alpha-2 country of numbers written without a country code, such as HR
keepContactsWithInvalidDetailsNoFirst call only: true keeps a contact whose name or email is invalid with that field left blank; false (default) rejects it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes far beyond the annotations: it discloses that nothing is imported until commit, that invalid rows are listed by index and dropped, that a duplicate number replaces the earlier row (last wins), that validity is only decided after commit, and gives concrete quotas (5,000 contacts/call, 100,000 contacts and 20 MB per draft, ~900 KB JSON per call, 3 drafts per brand, 2h idle / 24h max expiry). The non-destructive, non-idempotent hint is consistent with 'nothing imported until commit' and 'last one sent wins'.

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

Conciseness4/5

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

Front-loaded with the core action and dense with non-redundant operational detail; nearly every sentence carries a fact an agent needs (limits, expiry, dedupe, error handling). It is one undifferentiated block of prose, though, and the first-call vs. later-call rules would be much scannable as a short list.

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?

For a stateful, multi-call draft tool with conditional requiredness (0 required params in schema), the description covers the full lifecycle: first call creates and seeds, later calls append, commit finalizes, discard drops, and expiry/quotas cap it. Nothing essential for calling it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real semantics the schema cannot: columns are 'named once' and rows are 'arrays of values in that order', defaultCountry/groupIds/keepContactsWithInvalidDetails are first-call-only, draftId applies to later calls, and every row carries the same fields. It does not explain brandId's active-brand rule, which the schema carries instead.

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?

States a specific verb and resource ('Imports contacts from a file or list') into an import draft, and immediately distinguishes itself from flow_commit_contact_import ('nothing is imported until') and flow_start_contact_import ('sends a file of more than a few hundred rows in one request instead'). An agent can pick among the three contact-import siblings from the text alone.

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?

Explicit when-to-use: rows go here rather than one-request file upload, and this tool is the fallback when 'that request cannot reach the link.' It also states a prerequisite workflow step ('Before the first call, ask the user which country the numbers are from, suggesting the country most of them appear to be from') and a batching preference ('Send as many rows per call as fit... rather than small parts').

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources