Skip to main content
Glama

Write Back CRM Segments

crm-writeback-segments
Destructive

Writes saved company segments when the user wants each company's segment label written onto its CRM record — e.g., "tag my HubSpot companies with their market segment."

Takes the saved segmentation query's ID and writes each company's segment label onto the CRM record matched by domain — a DiscoLike Segment property on HubSpot/Pipedrive, a "DiscoLike segment:" line inside Description on Salesforce. Unclustered companies are skipped. Runs as a background job.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "provider": "<provider>",
      "query_id": "<query_id>"
    },
    "name": "crm-writeback-segments"
  }
}

Input Schema

NameRequiredDescriptionDefault
contextNoWhy you are calling this tool, in a few words. No names or emails.
providerYesCRM provider whose records should be tagged
query_idYesID of the saved segmentation query (equals the segment task_id)
llm_modelNoYour model id, or "unknown".
conversation_idNoThe conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.

Output Schema

NameRequiredDescriptionDefault
_mcp_instructionsNoServer-issued metadata for this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.",
      +  "type": "string"
      +}
    • addedOutput schema / properties
      Added value: +{
      +  "_mcp_instructions": {
      +    "description": "Server-issued metadata for this conversation.",
      +    "properties": {
      +      "conversation_id": {
      +        "description": "The server-issued conversation identifier.",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  }
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Why you are calling this tool, in a few words. No names or emails.",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "Your model id, or \"unknown\".",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare the important behavioral facts (destructiveHint=true, readOnlyHint=false, idempotentHint=false, openWorldHint=true), so the bar is lower. The description still adds real value by saying exactly what field gets mutated on each provider, that unclustered companies are skipped, and that execution is a background job. It does not address what happens on repeat runs, whether existing property values are overwritten, or required auth/scopes for the CRM.

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 trigger condition, then the mechanics and the per-provider mapping, which is a sensible order. It is slightly redundant, restating the write action in the second paragraph, and there are stray quotation marks and awkward line breaks from the source formatting, but every sentence still carries usable information.

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

Completeness3/5

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

The per-provider write targets, the skip rule, and the background-job nature cover most of what a destructive external write tool needs, and the presence of an output schema means return values need not be described. The notable gap is that it runs asynchronously without saying how progress or completion is observed, which matters for an agent that has just triggered an irreversible CRM mutation.

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 schema documents context, provider, query_id, llm_model and conversation_id, making 3 the baseline. The description goes further by explaining that query_id selects the saved segmentation query whose segment labels are written and that provider determines the destination field and record-matching key (domain), which is meaning the schema's short enum description does not carry.

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 plus the target artifact: it writes each company's segment label onto its CRM record, and names the concrete destination per provider (DiscoLike Segment property on HubSpot/Pipedrive, a 'DiscoLike segment:' line in Description on Salesforce). The example utterance plus the domain-matching detail makes it clearly distinguishable from crm-writeback-domains without opening either schema.

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

Usage Guidelines4/5

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

Gives an explicit trigger condition ('when the user wants each company's segment label written onto its CRM record') and a realistic user phrasing, which is enough for an agent to recognize the intent. It never states when NOT to use it, and does not name the obvious alternative such as crm-writeback-domains for domain propagation, leaving that routing to inference.

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