Skip to main content
Glama

Metadata MCP Connector

Create Segment

create_segment

Create a saved Insights segment from typed criteria over account-journey records. Returns the segment ID, name, status, and available account count. Invalid fields, operators, or values return validation errors; criteria groups support up to three nested group levels.

Input Schema

NameRequiredDescriptionDefault
nameYesDescriptive, unique segment name, e.g. 'Saturated: 200+ LinkedIn impressions'.
criteriaYes
lookback_windowNoOptional. Days to evaluate the segment over when counting `accounts` in the response; use the window the audience will be created with.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / criteria / additionalProperties
      Added value: +false
    • removedInput schema / properties / criteria / description
      Removed value: -"Criteria group: {\"operator\": \"AND\"|\"OR\", \"match\": [criterion | nested group]}. See VALUES BY TYPE."
    • removedInput schema / properties / criteria / properties / match / description
      Removed value: -"Criteria: {field, operator, type, value} objects, or nested {operator, match} groups."
    • addedInput schema / properties / criteria / properties / match / items / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "anyOf": [
      +      {
      +        "required": [
      +          "field"
      +        ]
      +      },
      +      {
      +        "required": [
      +          "property",
      +          "entity"
      +        ]
      +      }
      +    ],
      +    "properties": {
      +      "entity": {
      +        "type": "string"
      +      },
      +      "field": {
      +        "type": "string"
      +      },
      +      "operator": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "property": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "type": "string"
      +      },
      +      "value": {
      +        "anyOf": [
      +          {
      +            "type": [
      +              "string",
      +              "number",
      +              "boolean",
      +              "null"
      +            ]
      +          },
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "days": {
      +                "minimum": 1,
      +                "type": "integer"
      +              },
      +              "endDate": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "label": {
      +                "type": "string"
      +              },
      +              "name": {
      +                "type": "string"
      +              },
      +              "startDate": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "items": {
      +              "anyOf": [
      +                {
      +                  "type": [
      +                    "string",
      +                    "number"
      +                  ]
      +                },
      +                {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "label": {
      +                      "type": "string"
      +                    },
      +                    "name": {
      +                      "type": [
      +                        "string",
      +                        "number"
      +                      ]
      +                    }
      +                  },
      +                  "required": [
      +                    "name"
      +                  ],
      +                  "type": "object"
      +                }
      +              ]
      +            },
      +            "type": "array"
      +          }
      +        ]
      +      }
      +    },
      +    "required": [
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "match": {
      +        "items": {
      +          "anyOf": [
      +            {
      +              "additionalProperties": false,
      +              "anyOf": [
      +                {
      +                  "required": [
      +                    "field"
      +                  ]
      +                },
      +                {
      +                  "required": [
      +                    "property",
      +                    "entity"
      +                  ]
      +                }
      +              ],
      +              "properties": {
      +                "entity": {
      +                  "type": "string"
      +                },
      +                "field": {
      +                  "type": "string"
      +                },
      +                "operator": {
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                },
      +                "property": {
      +                  "type": "string"
      +                },
      +                "type": {
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "anyOf": [
      +                    {
      +                      "type": [
      +                        "string",
      +                        "number",
      +                        "boolean",
      +                        "null"
      +                      ]
      +                    },
      +                    {
      +                      "additionalProperties": false,
      +                      "properties": {
      +                        "days": {
      +                          "minimum": 1,
      +                          "type": "integer"
      +                        },
      +                        "endDate": {
      +                          "type": [
      +                            "string",
      +                            "null"
      +                          ]
      +                        },
      +                        "label": {
      +                          "type": "string"
      +                        },
      +                        "name": {
      +                          "type": "string"
      +                        },
      +                        "startDate": {
      +                          "type": [
      +                            "string",
      +                            "null"
      +                          ]
      +                        }
      +                      },
      +                      "type": "object"
      +                    },
      +                    {
      +                      "items": {
      +                        "anyOf": [
      +                          {
      +                            "type": [
      +                              "string",
      +                              "number"
      +                            ]
      +                          },
      +                          {
      +                            "additionalProperties": false,
      +                            "properties": {
      +                              "label": {
      +                                "type": "string"
      +                              },
      +                              "name": {
      +                                "type": [
      +                                  "string",
      +                                  "number"
      +                                ]
      +                              }
      +                            },
      +                            "required": [
      +                              "name"
      +                            ],
      +                            "type": "object"
      +                          }
      +                        ]
      +                      },
      +                      "type": "array"
      +                    }
      +                  ]
      +                }
      +              },
      +              "required": [
      +                "value"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "match": {
      +                  "items": {
      +                    "additionalProperties": false,
      +                    "anyOf": [
      +                      {
      +                        "required": [
      +                          "field"
      +                        ]
      +                      },
      +                      {
      +                        "required": [
      +                          "property",
      +                          "entity"
      +                        ]
      +                      }
      +                    ],
      +                    "properties": {
      +                      "entity": {
      +                        "type": "string"
      +                      },
      +                      "field": {
      +                        "type": "string"
      +                      },
      +                      "operator": {
      +                        "type": [
      +                          "string",
      +                          "null"
      +                        ]
      +                      },
      +                      "property": {
      +                        "type": "string"
      +                      },
      +                      "type": {
      +                        "type": "string"
      +                      },
      +                      "value": {
      +                        "anyOf": [
      +                          {
      +                            "type": [
      +                              "string",
      +                              "number",
      +                              "boolean",
      +                              "null"
      +                            ]
      +                          },
      +                          {
      +                            "additionalProperties": false,
      +                            "properties": {
      +                              "days": {
      +                                "minimum": 1,
      +                                "type": "integer"
      +                              },
      +                              "endDate": {
      +                                "type": [
      +                                  "string",
      +                                  "null"
      +                                ]
      +                              },
      +                              "label": {
      +                                "type": "string"
      +                              },
      +                              "name": {
      +                                "type": "string"
      +                              },
      +                              "startDate": {
      +                                "type": [
      +                                  "string",
      +                                  "null"
      +                                ]
      +                              }
      +                            },
      +                            "type": "object"
      +                          },
      +                          {
      +                            "items": {
      +                              "anyOf": [
      +                                {
      +                                  "type": [
      +                                    "string",
      +                                    "number"
      +                                  ]
      +                                },
      +                                {
      +                                  "additionalProperties": false,
      +                                  "properties": {
      +                                    "label": {
      +                                      "type": "string"
      +                                    },
      +                                    "name": {
      +                                      "type": [
      +                                        "string",
      +                                        "number"
      +                                      ]
      +                                    }
      +                                  },
      +                                  "required": [
      +                                    "name"
      +                                  ],
      +                                  "type": "object"
      +                                }
      +                              ]
      +                            },
      +                            "type": "array"
      +                          }
      +                        ]
      +                      }
      +                    },
      +                    "required": [
      +                      "value"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "minItems": 1,
      +                  "type": "array"
      +                },
      +                "operator": {
      +                  "enum": [
      +                    "AND",
      +                    "OR"
      +                  ],
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "operator",
      +                "match"
      +              ],
      +              "type": "object"
      +            }
      +          ]
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "operator": {
      +        "enum": [
      +          "AND",
      +          "OR"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "operator",
      +      "match"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / criteria / properties / match / items / type
      Removed value: -"object"
    • removedInput schema / properties / criteria / properties / operator / description
      Removed value: -"Logical operator combining the match entries."
  2. First observed

TDQS

A3.6/5.0
Behavior4/5

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

With annotations already stating readOnlyHint=false, destructiveHint=false, and openWorldHint=false, the description usefully adds that the tool returns segment ID, name, status, and available account count, and that invalid criteria produce validation errors. It also discloses the three-level nested group limit, though it does not discuss permissions or failure modes beyond validation.

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

Conciseness5/5

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

The description is three tight sentences with the core action front-loaded, followed by return behavior and validation constraints. Every sentence adds useful information without redundancy.

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

Completeness4/5

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

For a tool with a complex nested schema and no output schema, the description does well by stating the return fields and validation behavior and by noting the nesting depth limit. It is not fully complete because it leaves criteria grammar and field/operator semantics largely to the schema, but it covers the main agent needs.

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 coverage is 67%, and the description adds meaningful context about typed criteria and a maximum of three nested criteria group levels. However, it does not explain the AND/OR operator semantics or the distinction between field/property/entity criteria, and it does not mention the optional lookback_window parameter.

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

Purpose4/5

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

The description uses a specific verb and resource: "Create a saved Insights segment from typed criteria over account-journey records." It clearly identifies the object and the data domain, but it does not explicitly distinguish this tool from nearby siblings such as create_audience_from_segment, list_segments, or get_segment_criteria.

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

Usage Guidelines2/5

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

The description implies that this is the creation path for saved segments, but it gives no explicit when-to-use guidance, prerequisites, or comparison with alternatives like create_audience_from_segment or list_segments. An agent must infer the routing decision from context alone.

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