Skip to main content
Glama

get_property_details

Retrieve detailed information about a Google Analytics 4 property, including name, timezone, and currency settings, by providing the property ID.

Instructions

指定したGA4プロパティの詳細情報(名前、タイムゾーン、通貨など)を取得します。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
propertyIdYesGA4プロパティID(例: 123456789)

Implementation Reference

  • The core handler function implementing the get_property_details tool logic. It fetches property details from GA4 admin API, formats dates, and returns structured data.
    export async function getPropertyDetails( input: GetPropertyDetailsInput ): Promise<PropertyDetails> { const client = getAdminClient(); const propertyPath = formatPropertyPath(input.propertyId); const [property] = await client.getProperty({ name: propertyPath, }); if (!property) { throw new Error(`プロパティが見つかりません: ${input.propertyId}`); } return { propertyId: input.propertyId, displayName: property.displayName || "", timeZone: property.timeZone || "", currencyCode: property.currencyCode || "", industryCategory: property.industryCategory ? String(property.industryCategory) : undefined, serviceLevel: property.serviceLevel ? String(property.serviceLevel) : undefined, createTime: property.createTime ? new Date( Number(property.createTime.seconds) * 1000 ).toISOString() : undefined, updateTime: property.updateTime ? new Date( Number(property.updateTime.seconds) * 1000 ).toISOString() : undefined, }; }
  • TypeScript type definitions for the input (GetPropertyDetailsInput) and output (PropertyDetails) of the get_property_details tool.
    // get_property_details export interface GetPropertyDetailsInput extends PropertyId { propertyId: string; } export interface PropertyDetails { propertyId: string; displayName: string; timeZone: string; currencyCode: string; industryCategory?: string; serviceLevel?: string; createTime?: string; updateTime?: string; }
  • src/server.ts:73-86 (registration)
    MCP tool registration defining the name, description, and JSON input schema for get_property_details.
    name: "get_property_details", description: "指定したGA4プロパティの詳細情報(名前、タイムゾーン、通貨など)を取得します。", inputSchema: { type: "object" as const, properties: { propertyId: { type: "string", description: "GA4プロパティID(例: 123456789)", }, }, required: ["propertyId"], }, },
  • src/server.ts:574-578 (registration)
    Switch case in handleToolCall that invokes the getPropertyDetails handler with parsed arguments.
    case "get_property_details": return await getPropertyDetails({ propertyId: args.propertyId as string, });
  • Re-export of the getPropertyDetails function from its implementation file, used by server.ts.
    export { getPropertyDetails } from "./getPropertyDetails.js";

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/Shin-sibainu/ga4-mcp-server'

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