Skip to main content
Glama
PinMeTo

PinMeTo Location MCP

Official
by PinMeTo

Facebook insights

pinmeto_get_facebook_insights
Read-only

Fetch Facebook metrics for all or a single location within a date range, with daily-to-total aggregation and prior-period/year comparisons for performance analysis.

Instructions

Fetch Facebook metrics for all locations, or a single location if storeId provided. Supports time aggregation (default: total) and period comparisons.

Comparison Options:

  • compare_with="prior_period": Compare with same-duration period before (MoM, QoQ)

  • compare_with="prior_year": Compare with same dates last year (YoY)

  • When comparison is active, each metric includes a comparison field with prior, delta, deltaPercent

Error Handling:

  • Rate limit (429): errorCode="RATE_LIMITED", message includes retry timing

  • Not found (404): errorCode="NOT_FOUND" if storeId doesn't exist

  • All errors: check structuredContent.errorCode and .retryable for programmatic handling

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesEnd date (YYYY-MM-DD)
fromYesStart date (YYYY-MM-DD)
storeIdNoOptional store ID to fetch a single location
aggregationNoTime aggregation: total (default, maximum token reduction), daily, weekly, monthly, quarterly, half-yearly, yearlytotal
compare_withNoCompare with: prior_period (MoM/QoQ for same-duration period before), prior_year (YoY for same dates last year), or none (default)none
response_formatNoResponse format: "json" (default, token-efficient) or "markdown" (human-readable with tables)json

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoError message if the request failed
warningNoWarning message (e.g., incomplete data due to lag)
insightsNoArray of insights by metric. Flattened (no values array) when aggregation=total, multi-period otherwise (absent on error)
errorCodeNoError code for programmatic handling
retryableNoWhether the operation can be retried
compareWithNoComparison period type used: "none", "prior_period", or "prior_year"
periodRangeNoDate range for the current period data
warningCodeNoWarning code for programmatic handling
comparisonErrorNoError message if comparison data could not be fetched (current period data still returned)
timeAggregationNoTime aggregation level applied to the data (e.g., "total", "monthly", "daily")
priorPeriodRangeNoDate range for the prior period (present when compare_with is specified)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv4.3.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / to / $ref
      Removed value: -"#/properties/from"
    • addedInput schema / properties / to / pattern
      Added value: +"^\\d{4}-\\d{2}-\\d{2}$"
    • addedInput schema / properties / to / type
      Added value: +"string"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / properties / priorPeriodRange / $ref
      Removed value: -"#/properties/periodRange"
    • addedOutput schema / properties / priorPeriodRange / additionalProperties
      Added value: +false
    • addedOutput schema / properties / priorPeriodRange / properties
      Added value: +{
      +  "from": {
      +    "description": "Start date (YYYY-MM-DD)",
      +    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +    "type": "string"
      +  },
      +  "to": {
      +    "description": "End date (YYYY-MM-DD)",
      +    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / priorPeriodRange / required
      Added value: +[
      +  "from",
      +  "to"
      +]
    • addedOutput schema / properties / priorPeriodRange / type
      Added value: +"object"
  2. First observedv4.0.0

TDQS

A3.7/5.0
Behavior4/5

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

The readOnlyHint annotation already signals safety, and the description adds meaningful behavioral details beyond that: comparison fields (prior, delta, deltaPercent), rate-limit error codes and retry timing, not-found handling, and instructions to inspect structuredContent.errorCode and .retryable. These enrich the agent's understanding of expected runtime behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for comparison options and error handling. It front-loads the main purpose and uses bullets effectively. A small amount of redundancy with the schema exists, but the overall structure earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema, readOnly annotation, and high parameter coverage, the description is largely complete: it covers scope, aggregation, comparisons, and error handling. The main missing piece is explicit guidance on how this tool relates to sibling insights tools such as facebook_brandpage_insights.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds some semantic value by noting that omitting storeId returns all locations and by expanding on comparison behavior, but it largely restates what the schema already documents for aggregation and response_format.

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 opens with a specific action and resource: 'Fetch Facebook metrics for all locations, or a single location if storeId provided.' This clearly defines the tool's scope. However, it doesn't explicitly differentiate this from the sibling get_facebook_brandpage_insights, so it falls short of full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives context by explaining that all locations are fetched unless storeId is provided, which implies the primary use case. But it does not explicitly state when to choose this tool versus siblings like facebook_brandpage_insights, google_insights, or apple_insights, nor does it mention any exclusions or alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.