Textline MCP by usefulapi
Read Textline conversations, contacts and reports; send a text, add notes, resolve or transfer.
我該用這個嗎
品質與安全性
發現項目(1)
- LOW在 textline_get_conversation_by_phone 中
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"textline": {
"url": "https://textline.usefulapi.io/mcp"
}
}
}遠端端點
https://textline.usefulapi.io/mcpstreamable-http它能做什麼
工具清單
工具(23)
🟢textline_list_conversations(group_uuid, query, page, page_size)
List conversations (one per contact) in a department of the Textline shared inbox, with the contact and resolved status. Optional keyword search. GET /api/conversations.json.
輸入結構描述
{
"type": "object",
"properties": {
"group_uuid": {
"description": "Department (group) UUID from textline_list_departments. Default: the first department.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"query": {
"description": "Keyword to search conversations on (name, phone, message text).",
"type": "string",
"maxLength": 200
},
"page": {
"description": "Page number, 0-based (default 0).",
"type": "integer",
"minimum": 0,
"maximum": 100000
},
"page_size": {
"description": "Results per page (default 30, max 50).",
"type": "integer",
"minimum": 1,
"maximum": 50
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_get_conversation(conversation_uuid, before_uuid, after_uuid, page, page_size)
Retrieve one conversation and its posts (messages in and out, internal whispers, resolve/transfer events), newest page first. Page with page/page_size or with before_uuid/after_uuid (a post uuid). GET /api/conversation/{uuid}.json.
輸入結構描述
{
"type": "object",
"properties": {
"conversation_uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"description": "Conversation UUID."
},
"before_uuid": {
"description": "Only posts before this post uuid (exclusive).",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"after_uuid": {
"description": "Only posts after this post uuid (exclusive).",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"page": {
"description": "Page number, 0-based (default 0).",
"type": "integer",
"minimum": 0,
"maximum": 100000
},
"page_size": {
"description": "Results per page (default 30, max 50).",
"type": "integer",
"minimum": 1,
"maximum": 50
}
},
"required": [
"conversation_uuid"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_get_conversation_by_phone(phone_number, group_uuid, before_uuid, after_uuid, page, ...)
Retrieve the conversation with a phone number (in a department) and its posts (messages). GET /api/conversations.json?phone_number=….
輸入結構描述
{
"type": "object",
"properties": {
"phone_number": {
"type": "string",
"maxLength": 25,
"pattern": "^\\+?[0-9 ().-]+$",
"description": "The contact's phone number, e.g. +14155550123 or (415) 555-0123."
},
"group_uuid": {
"description": "Department (group) UUID from textline_list_departments. Default: the first department.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"before_uuid": {
"description": "Only posts before this post uuid (exclusive).",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"after_uuid": {
"description": "Only posts after this post uuid (exclusive).",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"page": {
"description": "Page number, 0-based (default 0).",
"type": "integer",
"minimum": 0,
"maximum": 100000
},
"page_size": {
"description": "Results per page (default 30, max 50).",
"type": "integer",
"minimum": 1,
"maximum": 50
}
},
"required": [
"phone_number"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_list_customers(query, page, page_size)
List or search contacts (customers) in the Textline address book: name, phone, email, tags, notes, custom fields, consent and reachability. GET /api/customers.json.
輸入結構描述
{
"type": "object",
"properties": {
"query": {
"description": "Keyword to search on (name, phone, email, tag).",
"type": "string",
"maxLength": 200
},
"page": {
"description": "Page number, 0-based (default 0).",
"type": "integer",
"minimum": 0,
"maximum": 100000
},
"page_size": {
"description": "Results per page (default 30, max 50).",
"type": "integer",
"minimum": 1,
"maximum": 50
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_get_customer(customer_uuid)
Retrieve one contact (customer) from the address book by UUID. GET /api/customer/{uuid}.json.
輸入結構描述
{
"type": "object",
"properties": {
"customer_uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"description": "Contact (customer) UUID."
}
},
"required": [
"customer_uuid"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_get_customer_by_phone(phone_number)
Retrieve one contact (customer) from the address book by phone number. GET /api/customers.json?phone_number=….
輸入結構描述
{
"type": "object",
"properties": {
"phone_number": {
"type": "string",
"maxLength": 25,
"pattern": "^\\+?[0-9 ().-]+$",
"description": "The contact's phone number."
}
},
"required": [
"phone_number"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_list_custom_fields
List the address book's custom fields (name, data type, UUID). Use the UUIDs with textline_update_customer. GET /api/address_book/custom_fields.json.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_list_saved_searches
List the address book's saved searches (contact segments) with name, description and UUID. GET /api/address_book/saved_searches.json.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_get_organization(include_groups, include_users)
Retrieve the organization (account) name, optionally with its departments and agents. GET /api/organization.json.
輸入結構描述
{
"type": "object",
"properties": {
"include_groups": {
"description": "Include the departments.",
"type": "boolean"
},
"include_users": {
"description": "Include the agents (users).",
"type": "boolean"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_list_departments
List the departments (groups / inbox phone lines) the token's agent can see: name, UUID, phone number, type (sms, facebook, smart_sms) and member agent UUIDs. GET /api/groups.json.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_list_agents
List the agents (users) in the organization: name, email, UUID, permission level, availability and department UUIDs. GET /api/organization.json?include_users=1.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_get_agent(user_uuid, email)
Retrieve one agent (user) by UUID or email: name, permission level, availability (on_call) and departments. GET /api/users.json.
輸入結構描述
{
"type": "object",
"properties": {
"user_uuid": {
"description": "Agent UUID.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"email": {
"description": "Agent email.",
"type": "string",
"maxLength": 254,
"pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_list_dispositions(group_uuid)
List the dispositions (resolution reasons) set up in the account, optionally for one department. Use a UUID with textline_resolve_conversation. GET /api/dispositions.json.
輸入結構描述
{
"type": "object",
"properties": {
"group_uuid": {
"description": "Only dispositions of this department.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_list_surveys
List surveys (NPS, CSAT, custom) with their type and UUID. GET /api/surveys.json.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_list_survey_responses(survey_uuid, start_date, end_date)
List the responses to one survey (ratings, follow-up text, contact, tags). Default: the last 30 days. GET /api/survey/{uuid}/responses.json.
輸入結構描述
{
"type": "object",
"properties": {
"survey_uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"description": "Survey UUID from textline_list_surveys."
},
"start_date": {
"description": "First day, YYYY-MM-DD.",
"type": "string"
},
"end_date": {
"description": "Last day, YYYY-MM-DD.",
"type": "string"
}
},
"required": [
"survey_uuid"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_report_conversations(group_uuid, search_uuid, page, page_size, sort_by, ...)
Reporting API: list a department's conversations filtered by created/updated time, resolved, archived or blocked, with total_records. To get the next page pass the returned next.search_uuid, next.page and next.page_size exactly (the same filters are kept). Then use textline_report_posts per conversation. GET /api/reporting/conversations.json.
輸入結構描述
{
"type": "object",
"properties": {
"group_uuid": {
"description": "Department UUID (required unless search_uuid is given).",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"search_uuid": {
"description": "Continue an earlier result set: next.search_uuid from a previous call (with next.page and next.page_size).",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"page": {
"description": "Page number, 0-based (default 0).",
"type": "integer",
"minimum": 0,
"maximum": 100000
},
"page_size": {
"description": "Results per page (default 30, max 30).",
"type": "integer",
"minimum": 1,
"maximum": 30
},
"sort_by": {
"description": "Sort field (default created_at).",
"type": "string",
"enum": [
"created_at",
"updated_at"
]
},
"sort_order": {
"description": "Sort order (default desc).",
"type": "string",
"enum": [
"asc",
"desc"
]
},
"created_after": {
"description": "Created after this ISO date-time (with timezone).",
"type": "string"
},
"created_before": {
"description": "Created before this ISO date-time (with timezone).",
"type": "string"
},
"updated_after": {
"description": "Updated after this ISO date-time (with timezone).",
"type": "string"
},
"updated_before": {
"description": "Updated before this ISO date-time (with timezone).",
"type": "string"
},
"resolved": {
"description": "Only resolved (true) or unresolved (false) conversations.",
"type": "boolean"
},
"archived": {
"description": "Only archived (true) or unarchived (false) contacts. Default: both.",
"type": "boolean"
},
"blocked": {
"description": "Only blocked (true) or unblocked (false) contacts. Default: both.",
"type": "boolean"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢textline_report_posts(conversation_uuid, search_uuid, page, page_size, sort_order, ...)
Reporting API: list all posts (messages, whispers) of one conversation with creator, thread, first-response flags, filtered by created time, with total_records. To get the next page pass the returned next.search_uuid, next.page and next.page_size exactly. GET /api/reporting/conversation/{uuid}/posts.json.
輸入結構描述
{
"type": "object",
"properties": {
"conversation_uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"description": "Conversation UUID."
},
"search_uuid": {
"description": "Continue an earlier result set: next.search_uuid from a previous call (with next.page and next.page_size).",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"page": {
"description": "Page number, 0-based (default 0).",
"type": "integer",
"minimum": 0,
"maximum": 100000
},
"page_size": {
"description": "Results per page (default 30, max 30).",
"type": "integer",
"minimum": 1,
"maximum": 30
},
"sort_order": {
"description": "Sort order (default desc).",
"type": "string",
"enum": [
"asc",
"desc"
]
},
"created_after": {
"description": "Created after this ISO date-time (with timezone).",
"type": "string"
},
"created_before": {
"description": "Created before this ISO date-time (with timezone).",
"type": "string"
}
},
"required": [
"conversation_uuid"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴textline_send_message(conversation_uuid, phone_number, group_uuid, body, attachment_urls, ...)
SENDS A REAL SMS/MMS to ONE contact from your Textline number — the customer receives it immediately and it cannot be unsent; it consumes message credits. Address it by conversation_uuid or by phone_number (+ optional department). Confirm the recipient and text with the user first. One recipient per call; no bulk sends. POST /api/conversation/{uuid}.json or POST /api/conversations.json.
輸入結構描述
{
"type": "object",
"properties": {
"conversation_uuid": {
"description": "The conversation UUID (pass this OR phone_number).",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"phone_number": {
"description": "The contact's phone number (pass this OR conversation_uuid); opens the conversation if there is none.",
"type": "string",
"maxLength": 25,
"pattern": "^\\+?[0-9 ().-]+$"
},
"group_uuid": {
"description": "With phone_number only: the department to use. Default: the first department.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"body": {
"type": "string",
"minLength": 1,
"maxLength": 1600,
"description": "The message text the customer will receive."
},
"attachment_urls": {
"description": "Public https URLs of files to attach (makes it an MMS).",
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"maxLength": 2000,
"format": "uri"
}
},
"resolve": {
"description": "Resolve the conversation after sending.",
"type": "boolean"
}
},
"required": [
"body"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡textline_add_whisper(conversation_uuid, phone_number, group_uuid, body, resolve)
WRITE: add an internal whisper (a note only your agents see, never sent to the customer) to a conversation, by conversation_uuid or phone_number. POST /api/conversation/{uuid}.json or POST /api/conversations.json with a whisper.
輸入結構描述
{
"type": "object",
"properties": {
"conversation_uuid": {
"description": "The conversation UUID (pass this OR phone_number).",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"phone_number": {
"description": "The contact's phone number (pass this OR conversation_uuid); opens the conversation if there is none.",
"type": "string",
"maxLength": 25,
"pattern": "^\\+?[0-9 ().-]+$"
},
"group_uuid": {
"description": "With phone_number only: the department to use. Default: the first department.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"body": {
"type": "string",
"minLength": 1,
"maxLength": 5000,
"description": "The note text (visible to agents only)."
},
"resolve": {
"description": "Resolve the conversation after adding the note.",
"type": "boolean"
}
},
"required": [
"body"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡textline_resolve_conversation(conversation_uuid, disposition_uuid)
WRITE: mark a conversation resolved (closed), optionally with a disposition from textline_list_dispositions. Nothing is sent to the customer. POST /api/conversation/{uuid}/resolve.json.
輸入結構描述
{
"type": "object",
"properties": {
"conversation_uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"description": "Conversation UUID."
},
"disposition_uuid": {
"description": "Disposition (resolution reason) UUID.",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
}
},
"required": [
"conversation_uuid"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡textline_transfer_conversation(conversation_uuid, user_uuid, assignee)
WRITE: assign a conversation to another agent of the same department, by agent UUID or email (one of them). Nothing is sent to the customer. POST /api/conversation/{uuid}/transfer.json.
輸入結構描述
{
"type": "object",
"properties": {
"conversation_uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"description": "Conversation UUID."
},
"user_uuid": {
"description": "The agent's UUID (from textline_list_agents).",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"assignee": {
"description": "The agent's email.",
"type": "string",
"maxLength": 254,
"pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
}
},
"required": [
"conversation_uuid"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡textline_create_customer(phone_number, name, email, notes, tags)
WRITE: add a contact (customer) to the Textline address book. Sends nothing to the contact. POST /api/customers.json.
輸入結構描述
{
"type": "object",
"properties": {
"phone_number": {
"type": "string",
"maxLength": 25,
"pattern": "^\\+?[0-9 ().-]+$",
"description": "The contact's phone number."
},
"name": {
"description": "Full name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"email": {
"description": "Email address.",
"type": "string",
"maxLength": 254,
"pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
},
"notes": {
"description": "Notes on the contact (replaces the existing notes).",
"type": "string",
"maxLength": 5000
},
"tags": {
"description": "Tags, e.g. ['VIP', 'new_lead'] (underscores instead of spaces).",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"pattern": "^[^,\\s]+$"
}
}
},
"required": [
"phone_number"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴textline_update_customer(customer_uuid, name, email, notes, tags, ...)
WRITE: update a contact's name, email, notes, tags (add, remove or replace) or custom fields (by custom-field UUID from textline_list_custom_fields). Overwrites the fields you pass; sends nothing to the contact. PUT /api/customer/{uuid}.json.
輸入結構描述
{
"type": "object",
"properties": {
"customer_uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"description": "Contact (customer) UUID."
},
"name": {
"description": "Full name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"email": {
"description": "Email address.",
"type": "string",
"maxLength": 254,
"pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
},
"notes": {
"description": "Notes on the contact (replaces the existing notes).",
"type": "string",
"maxLength": 5000
},
"tags": {
"description": "Tags, e.g. ['VIP', 'new_lead'] (underscores instead of spaces).",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"pattern": "^[^,\\s]+$"
}
},
"tags_handling": {
"description": "How to apply tags: add, remove or replace (Textline's default if omitted).",
"type": "string",
"enum": [
"add",
"remove",
"replace"
]
},
"custom_fields": {
"description": "Custom field values keyed by custom-field UUID, e.g. {\"c43a1766-47e1-4c9c-a2cc-36bf424fcbc0\": \"Gold\"}.",
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"additionalProperties": {
"type": "string",
"maxLength": 2000
}
}
},
"required": [
"customer_uuid"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}社群
證據