Skip to main content
Glama

polarity_record_event

Record a structured event in your knowledge graph. Use for point-in-time occurrences like meetings, releases, or incidents.

Instructions

Record a structured event in the user's graph. Convenience wrapper over polarity_observe with kind='event'. Use for things that happened at a point in time: a meeting, a shipped release, a flight, an incident.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
sourceNo
tagsNo
confidenceNo

Implementation Reference

  • Tool 'polarity_record_event' is registered in the TOOLS array with its name, description, schema, and handler.
    {
      name: "polarity_record_event",
      description:
        "Record a structured event in the user's graph. Convenience wrapper over polarity_observe with kind='event'. Use for things that happened at a point in time: a meeting, a shipped release, a flight, an incident.",
      inputSchema: z
        .object({
          text: z.string().min(1).max(4000),
          source: z.string().max(64).optional(),
          tags: z.array(z.string().max(32)).max(8).optional(),
          confidence: z.number().min(0).max(1).optional(),
        })
        .strict(),
      handler: async (input, client) =>
        client.observe({ ...(input as { text: string }), kind: "event" }),
    },
  • Input schema for polarity_record_event: requires text string (1-4000 chars), optional source (max 64), tags (max 8 of max 32 chars each), and confidence (0-1).
    inputSchema: z
      .object({
        text: z.string().min(1).max(4000),
        source: z.string().max(64).optional(),
        tags: z.array(z.string().max(32)).max(8).optional(),
        confidence: z.number().min(0).max(1).optional(),
      })
      .strict(),
  • Handler for polarity_record_event: wraps client.observe() with kind='event' set, spreading the input as the body.
    handler: async (input, client) =>
      client.observe({ ...(input as { text: string }), kind: "event" }),
  • The client.observe() method that polarity_record_event delegates to. Sends a POST to /api/polarity/observe with the input plus polarity_user_id.
    // Write endpoints
    observe(input: {
      text: string;
      source?: string;
      tags?: string[];
      kind?: "observation" | "event" | "preference";
      confidence?: number;
    }) {
      return this.request<ObserveResponse>({
        method: "POST",
        path: "/api/polarity/observe",
        body: { polarity_user_id: this.config.polarityUserId, ...input },
      });
    }
  • ObserveResponse interface: returns node_id and kind on success.
    export interface ObserveResponse {
      node_id: number;
      kind: string;
    }
Behavior2/5

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

No annotations are provided. The description does not disclose behavioral traits such as idempotency, authorization needs, or side effects. It only labels itself a 'convenience wrapper' without elaboration.

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?

Two concise sentences, front-loaded with purpose and usage. Every sentence adds value.

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

Completeness2/5

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

Given no annotations or output schema, the description is incomplete. It fails to describe return values, error conditions, or parameter restrictions beyond what the schema defines.

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

Parameters1/5

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

Schema coverage is 0% and the description provides no explanation of the parameters (text, source, tags, confidence). The agent gets no additional meaning beyond the schema property names.

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 'Record a structured event' with specific examples like meeting, release, flight, incident. It distinguishes from sibling tool polarity_observe by noting it's a 'convenience wrapper' with kind='event'.

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?

Provides explicit context: 'Use for things that happened at a point in time' along with concrete examples. Does not explicitly state when not to use, but the guidance is clear enough.

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/teampolarity/cosmos-mcp'

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