get_property_details
Retrieve property definitions and identify usage across events and property groups in analytics specifications.
Instructions
Get property definition and see where it is used across events and property groups.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| property_name | Yes | Name of the property to retrieve |
Implementation Reference
- src/mcp-server/tools.js:238-272 (handler)The core handler function that implements the logic for retrieving property details, including type, constraints, description, and usage across property groups and events (direct and indirect).handler: async (args) => { const prop = propertiesMap.get(args.property_name); if (!prop) { throw new NotFoundError('Property', args.property_name); } // Find usage in property groups const usedInGroups = propertyGroups .filter(g => splitMultiLine(g.properties).includes(args.property_name)) .map(g => g.group_name); // Find usage in events (direct additional properties) const usedInEvents = events .filter(e => splitMultiLine(e.additional_properties).includes(args.property_name)) .map(e => e.event_name); // Find events that use this property via groups const eventsViaGroups = events .filter(e => { const eventGroups = splitMultiLine(e.property_groups); return eventGroups.some(groupName => usedInGroups.includes(groupName)); }) .map(e => e.event_name); return { name: prop.property_name, type: prop.type, constraints: prop.constraints || null, description: prop.description, usage: prop.usage || null, used_in_groups: usedInGroups, used_in_events_directly: usedInEvents, used_in_events_via_groups: eventsViaGroups }; }
- src/mcp-server/tools.js:228-237 (schema)Input schema defining the required 'property_name' parameter for the tool.inputSchema: { type: 'object', properties: { property_name: { type: 'string', description: 'Name of the property to retrieve' } }, required: ['property_name'] },
- src/mcp-server/tools.js:226-273 (registration)The tool is registered as an entry in the exported 'tools' object, which is imported and dynamically handled by the MCP server's request handlers for listing and calling tools.get_property_details: { description: 'Get property definition and see where it is used across events and property groups.', inputSchema: { type: 'object', properties: { property_name: { type: 'string', description: 'Name of the property to retrieve' } }, required: ['property_name'] }, handler: async (args) => { const prop = propertiesMap.get(args.property_name); if (!prop) { throw new NotFoundError('Property', args.property_name); } // Find usage in property groups const usedInGroups = propertyGroups .filter(g => splitMultiLine(g.properties).includes(args.property_name)) .map(g => g.group_name); // Find usage in events (direct additional properties) const usedInEvents = events .filter(e => splitMultiLine(e.additional_properties).includes(args.property_name)) .map(e => e.event_name); // Find events that use this property via groups const eventsViaGroups = events .filter(e => { const eventGroups = splitMultiLine(e.property_groups); return eventGroups.some(groupName => usedInGroups.includes(groupName)); }) .map(e => e.event_name); return { name: prop.property_name, type: prop.type, constraints: prop.constraints || null, description: prop.description, usage: prop.usage || null, used_in_groups: usedInGroups, used_in_events_directly: usedInEvents, used_in_events_via_groups: eventsViaGroups }; } },