Skip to main content
Glama
paulsham

Wiki Analytics Specification MCP Server

by paulsham

get_event_implementation

Retrieve complete analytics event specifications with expanded properties for implementing tracking code in development workflows.

Instructions

Get complete event specification with all properties expanded. Use when implementing tracking code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_nameYesName of the event to retrieve

Implementation Reference

  • The handler function that implements the core logic of the 'get_event_implementation' tool. It looks up the event by name, expands its properties using getExpandedProperties, handles not found errors, and returns the complete event specification.
    handler: async (args) => {
      const event = eventsMap.get(args.event_name);
      if (!event) {
        throw new NotFoundError('Event', args.event_name);
      }
    
      const expanded = getExpandedProperties(event);
      return {
        event: event.event_name,
        description: event.event_description,
        table: event.event_table,
        notes: event.notes || null,
        property_groups: expanded.property_groups,
        additional_properties: expanded.additional_properties
      };
    }
  • The input schema for the tool, requiring a single 'event_name' string parameter.
    inputSchema: {
      type: 'object',
      properties: {
        event_name: {
          type: 'string',
          description: 'Name of the event to retrieve'
        }
      },
      required: ['event_name']
    },
  • The tool definition and registration within the exported 'tools' object used by the MCP server.
    get_event_implementation: {
      description: 'Get complete event specification with all properties expanded. Use when implementing tracking code.',
      inputSchema: {
        type: 'object',
        properties: {
          event_name: {
            type: 'string',
            description: 'Name of the event to retrieve'
          }
        },
        required: ['event_name']
      },
      handler: async (args) => {
        const event = eventsMap.get(args.event_name);
        if (!event) {
          throw new NotFoundError('Event', args.event_name);
        }
    
        const expanded = getExpandedProperties(event);
        return {
          event: event.event_name,
          description: event.event_description,
          table: event.event_table,
          notes: event.notes || null,
          property_groups: expanded.property_groups,
          additional_properties: expanded.additional_properties
        };
      }
    },
  • Helper function called by the handler to expand property groups and additional properties with detailed property information from the loaded data maps.
    export function getExpandedProperties(event) {
      const result = {
        property_groups: [],
        additional_properties: []
      };
    
      // Expand property groups
      const groupNames = splitMultiLine(event.property_groups);
      for (const groupName of groupNames) {
        const group = propertyGroupsMap.get(groupName);
        if (group) {
          const groupProps = splitMultiLine(group.properties).map(propName => {
            const prop = propertiesMap.get(propName);
            return prop ? {
              name: prop.property_name,
              type: prop.type,
              constraints: prop.constraints || null,
              description: prop.description
            } : { name: propName, type: 'unknown', constraints: null, description: 'Property not found' };
          });
    
          result.property_groups.push({
            name: groupName,
            description: group.description,
            properties: groupProps
          });
        }
      }
    
      // Expand additional properties
      const additionalNames = splitMultiLine(event.additional_properties);
      for (const propName of additionalNames) {
        const prop = propertiesMap.get(propName);
        result.additional_properties.push(prop ? {
          name: prop.property_name,
          type: prop.type,
          constraints: prop.constraints || null,
          description: prop.description
        } : { name: propName, type: 'unknown', constraints: null, description: 'Property not found' });
      }
    
      return result;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions retrieving 'complete event specification with all properties expanded,' which implies a read-only operation, but doesn't address potential behavioral traits like error handling, rate limits, authentication needs, or what 'complete' entails. This leaves significant gaps for a tool with no structured safety hints.

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 extremely concise and front-loaded, consisting of just two sentences that directly state the purpose and usage without any wasted words. Every sentence earns its place by providing essential information efficiently.

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 the lack of annotations and output schema, the description is incomplete for a tool that retrieves event specifications. It doesn't explain what 'complete event specification' includes, the return format, or any behavioral aspects like pagination or errors. For a read operation with no structured output, more context is needed to fully guide the 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?

The input schema has 100% description coverage, with the parameter 'event_name' clearly documented as 'Name of the event to retrieve.' The description doesn't add any additional meaning or context beyond this, such as format examples or constraints, so it meets the baseline score when the schema does the heavy lifting.

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 clearly states the tool's purpose with a specific verb ('Get') and resource ('complete event specification with all properties expanded'), making it easy to understand what it does. However, it doesn't explicitly distinguish this from sibling tools like 'get_property_details' or 'get_related_events', which might also retrieve event-related information, so it doesn't reach the highest score.

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?

The description provides clear context for when to use the tool ('Use when implementing tracking code'), which helps guide the agent. However, it doesn't specify when not to use it or name alternatives among the sibling tools, such as when to choose 'search_events' instead, so it lacks explicit exclusions or comparisons.

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/paulsham/wiki-mcp-analytics-test-1.1.0'

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