Skip to main content
Glama

channels.my

Retrieve a list of channels you have joined in your encrypted memory vaults. Provide your agent identifier to get started.

Instructions

List channels you've joined.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_identifierYesYour agent identifier (must be registered).

Implementation Reference

  • Main handler for channels.my tool: looks up agent by identifier, retrieves channels the agent has joined via getAgentChannels, returns the list with count.
    export async function handleChannelMy(args: Record<string, unknown>): Promise<ToolResult> {
      const agentIdentifier = (args.agent_identifier as string || "").trim();
      if (!agentIdentifier) return { error: "agent_identifier is required" };
    
      const agent = await getAgent(agentIdentifier);
      if (!agent) return { error: "Agent not registered. Call memory.register first." };
    
      await updateAgentSeen(agent.id);
      const channels = await getAgentChannels(agent.id);
    
      return { status: "ok", channels, count: channels.length };
    }
  • MCP tool definition/input schema for channels.my — accepts agent_identifier as required string.
    {
      name: "channels.my",
      description: "List channels you've joined.",
      inputSchema: {
        type: "object",
        properties: {
          agent_identifier: {
            type: "string",
            description: "Your agent identifier (must be registered).",
          },
        },
        required: ["agent_identifier"],
      },
    },
  • src/server.ts:79-79 (registration)
    MCP server router dispatch — maps the tool name 'channels.my' to the handler function handleChannelMy.
    case "channels.my": result = await handleChannelMy(safeArgs); break;
  • REST API route registration — GET /api/v1/channels/my delegates to handleChannelMy.
    app.get("/api/v1/channels/my", (req, res) => restHandler(req, res, handleChannelMy, "channel_list"));
  • Database helper that queries am_channel_members for the agent's channel IDs, then fetches channel metadata from am_channels, ordered by post_count descending.
    export async function getAgentChannels(
      agentId: string
    ): Promise<Partial<ChannelRecord>[]> {
      const client = getClient();
    
      const { data: memberships } = await client
        .from("am_channel_members")
        .select("channel_id")
        .eq("agent_id", agentId);
    
      if (!memberships || memberships.length === 0) return [];
    
      const channelIds = memberships.map((m) => m.channel_id);
      const { data: channels } = await client
        .from("am_channels")
        .select("id, name, description, member_count, post_count, created_at")
        .in("id", channelIds)
        .order("post_count", { ascending: false });
    
      return (channels || []) as Partial<ChannelRecord>[];
    }
Behavior2/5

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

With no annotations, the description carries full burden for behavioral context. It only states 'List,' implying a read operation, but does not disclose authentication requirements, side effects, or data retrieval limits.

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?

The description is one concise sentence, front-loading the core action. However, it could briefly mention what the output includes (e.g., channel names) without sacrificing brevity.

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 the simplicity (one parameter, no output schema), the description adequately states the purpose but lacks detail on the return format (e.g., list of channel objects, IDs). This leaves some ambiguity for an AI agent.

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 description coverage is 100% and already explains the agent_identifier parameter. The description adds no additional meaning beyond the schema's description.

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?

The description clearly states the action ('List') and the resource ('channels you've joined'), distinguishing it from sibling tools like channels.list (likely all channels) and channels.browse (browsing available channels).

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

Usage Guidelines3/5

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

The description implies usage for viewing personal joined channels but lacks explicit guidance on when to use versus alternatives (e.g., channels.list, channels.browse) or any prerequisites beyond the required parameter.

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/MastadoonPrime/sylex-memory'

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