Skip to main content
Glama
markhilton
by markhilton

cja_create_segment

Create a segment in Adobe Customer Journey Analytics using a JSON definition with filtering rules. Provide a name and optional description and data view.

Instructions

Create a new segment in CJA.

This tool creates a new segment/filter that can be used in reports. Segment definitions use a JSON structure to define filtering rules.

IMPORTANT: Segment definitions are complex. Best practice:

  1. Create a template segment in the CJA UI

  2. Use cja_get_segment_details to see its definition structure

  3. Modify the definition as needed

  4. Use cja_validate_segment before creating

Args: name: Segment name (required). definition: Segment definition object with container and rules (required). description: Optional segment description. dataview_id: Optional data view ID (uses configured default if not provided).

Returns: Dictionary with created segment including assigned ID.

Example queries: - "Create a segment for mobile users" - "Make a new filter for high-value customers"

Example definition (mobile users): { "container": { "func": "segment", "context": "hits", "pred": { "func": "exists", "val": {"func": "attr", "name": "variables/mobiledevicetype"} } }, "func": "segment-def", "version": [1, 0, 0] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
definitionYes
descriptionNo
dataview_idNo
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses creation behavior, required and optional parameters, and suggests validation. Adds context about complexity but does not detail error conditions or side effects.

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?

Well-structured with summary, best practices, args, returns, examples. Somewhat verbose but all information is useful and front-loaded.

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 complex tool with nested objects and no output schema, description provides example definition, return value, and example queries. Missing error handling but sufficient with sibling tools for validation and details.

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

Parameters5/5

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

Schema coverage is 0%, but description explains each parameter thoroughly: name, definition (with example), description, dataview_id. Provides meaning beyond schema types, including example definition.

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?

Clearly states 'Create a new segment in CJA.' with specific verb and resource. Distinguishes from sibling tools like cja_validate_segment and cja_get_segment_details.

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?

Explicitly provides best practices: use cja_get_segment_details to see structure, use cja_validate_segment before creating. Also suggests creating template in UI. Guides when to use this tool vs alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/markhilton/adobe-cja-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server