Skip to main content
Glama

list_segments

Retrieve all contact segments from the Keila newsletter platform to manage and target specific audience groups for email campaigns.

Instructions

List all contact segments.

Returns: A dict with 'data' (list of segments). Each segment has id, name, and filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool definition for 'list_segments' which wraps the _client.list_segments method.
    @mcp.tool()
    def list_segments() -> dict:
        """
        List all contact segments.
    
        Returns:
            A dict with 'data' (list of segments). Each segment has id, name, and filter.
        """
        return _client.list_segments()
  • The actual API implementation for listing segments in the client.
    def list_segments(self) -> dict:
        """List all segments."""
        resp = self.session.get(f"{self.url}/api/v1/segments", headers=self._headers(), timeout=30)
        resp.raise_for_status()
        return resp.json()
Behavior3/5

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

With no annotations provided, the description carries the full disclosure burden. It partially satisfies this by documenting the return structure (dict with 'data' containing id, name, filter), but omits operational details like pagination behavior, rate limits, or error handling.

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?

Brief two-sentence structure with minimal fluff. The 'Returns:' section is front-loaded and efficiently formatted, though slightly unconventional for MCP descriptions.

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?

Given no output schema exists, the description compensates by explaining return value structure. However, for a zero-parameter list operation with no annotations, it should clarify scope (e.g., 'all' vs paginated, user-scoped vs global) and empty result behavior.

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?

Input schema has 0 parameters, establishing baseline 4. Description correctly avoids unnecessary parameter documentation since none exist.

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?

States specific verb (List) and resource (contact segments) clearly. However, it does not differentiate from sibling list operations (list_contacts, list_campaigns) or clarify the relationship between segments and contacts.

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?

Provides no guidance on when to use this tool versus alternatives (e.g., when to use list_segments vs list_contacts, or whether this requires prerequisites like existing contacts).

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/gwbischof/keila-mcp'

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