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 main handler function for the 'get_property_details' tool. It retrieves the property from propertiesMap, checks if it exists, and computes its usage in property groups and events (direct and via groups).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 for the 'get_property_details' tool, requiring a 'property_name' string.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)Registration of the 'get_property_details' tool within the exported 'tools' object, including description, input schema, and handler reference.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 }; } },