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; }

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