# RevCent MCP Operation: `GetMetadataEntry`

This document explains how MCP/AI clients should use the `GetMetadataEntry` operation in RevCent.

This file focuses on retrieving values for a single metadata name and using those values to prepare better `BigQueryRunQuery` reports, filters, and analysis.

Sources:
- RevCent operation schema for `GetMetadataEntry`
- RevCent operation schema for `GetMetadata`
- RevCent operation schema and Markdown documentation for `BigQueryRunQuery`
- RevCent operation schema guidance for `GetBigQueryTables`

---

## Operation Summary

`GetMetadataEntry` retrieves the details of a specific metadata entry by Metadata ID.

Unlike `GetMetadata`, this operation returns saved values for the metadata name.

Important:

```text
GetMetadataEntry returns one metadata name plus its saved values.
A maximum of 500 unique metadata values will be returned.
```

Use `GetMetadataEntry` when the MCP/AI already knows the Metadata ID or has found it from `GetMetadata`.

---

# GetMetadataEntry vs GetMetadata

| Operation | Purpose | Returns Metadata Names? | Returns Metadata Values? | Main Use |
|---|---|---:|---:|---|
| `GetMetadata` | Retrieve paginated metadata names/index entries. | Yes | No | Discover metadata names and IDs. |
| `GetMetadataEntry` | Retrieve one metadata entry by ID. | Yes, one name | Yes, up to 500 unique values | Discover values for one metadata name. |

Practical flow:

```text
Use GetMetadata to find the metadata_id.
Use GetMetadataEntry to retrieve values for that metadata_id.
Use BigQueryRunQuery to run reports, aggregations, and item-level analysis using those names/values.
Search operations can also help find individual records related to those names/values.
```

---

# Why Metadata Values Matter

A metadata name gives the reporting dimension.

A metadata value gives the segment.

Example:

```text
name = source
values = Google, Facebook, TikTok, Affiliate
```

This allows MCP/AI to help users build reports such as:

```text
Revenue by source
Sales where source = Facebook
Declines where source = TikTok
Chargebacks where source = Affiliate
```

Without values, MCP/AI may not know which exact filter values are available.

---

# Required Input

| Parameter | Type | Required | Description |
|---|---:|---:|---|
| `metadata_id` | string | Yes | 20-character Metadata ID returned by `GetMetadata`. |

Example request:

```json
{
  "metadata_id": "MMMMMMMMMMMMMMMMMMMM"
}
```

---

# Output Summary

Successful response includes:

```json
{
  "api_call_id": "XXXXXXXXXXXXXXXXXXXX",
  "api_call_unix": 1740000000,
  "code": 1,
  "created_date_unix": 1740000000,
  "id": "MMMMMMMMMMMMMMMMMMMM",
  "name": "source",
  "enabled": true,
  "values": [
    "Google",
    "Facebook",
    "TikTok"
  ],
  "updated_date_unix": 1740000000
}
```

---

# Output Fields

| Field | Type | Description |
|---|---:|---|
| `api_call_id` | string | 20-character API call ID. |
| `api_call_unix` | integer | Unix timestamp when the API call was initiated. |
| `code` | integer | API response code. `1` indicates success. |
| `created_date_unix` | integer | Unix timestamp when the metadata entry was created. |
| `id` | string | 20-character Metadata ID. |
| `name` | string | Metadata name. |
| `enabled` | boolean | Whether the metadata entry is enabled. |
| `values` | array<string> | Saved metadata values for this metadata name. Maximum 500 unique values. |
| `updated_date_unix` | integer | Unix timestamp when the metadata entry was last updated. |

---

# 500 Unique Values Limit

`GetMetadataEntry` returns a maximum of:

```text
500 unique metadata values
```

This matters for high-cardinality metadata.

High-cardinality examples:

```text
click_id
gclid
session_id
visitor_id
external_order_id
request_id
```

If a metadata name has more than 500 unique values:

```text
GetMetadataEntry may not show every value.
Use BigQueryRunQuery for deeper analysis.
```

For report filtering, metadata names with controlled values are usually more useful.

Examples:

```text
source
campaign
utm_campaign
affiliate_id
coupon_code
landing_page
checkout_version
traffic_channel
```

---

# Why GetMetadataEntry Is Useful Before BigQueryRunQuery

`GetMetadataEntry` helps MCP/AI discover available values before building a query.

Example:

```text
User asks: "Run a report for campaign HolidaySale."
MCP can call GetMetadataEntry for campaign.
MCP verifies HolidaySale is a known value.
Then MCP builds a BigQueryRunQuery report using campaign = HolidaySale.
```

It is especially useful for:

- Showing filter options
- Validating exact values before SQL
- Avoiding misspelled query filters
- Understanding casing
- Discovering real values used by the account
- Helping the user choose between similar values

---

# Metadata Value Casing and Exact Matching

Metadata values should be treated as exact strings.

Examples:

```text
Facebook
facebook
FACEBOOK
```

These may be different values depending on how they were saved.

Before building a query filter, MCP/AI should prefer values returned from `GetMetadataEntry` rather than guessing.

Example:

```text
User says "facebook."
GetMetadataEntry returns "Facebook."
Use "Facebook" in the query unless the user specifically wants lowercase facebook.
```

---

---

# Metadata Can Be Any Custom Business Dimension

Metadata names and values can literally be anything the user or business has chosen to store.

Metadata is not limited to advertising, conversion tracking, UTM parameters, or affiliate attribution.

Advertising-related examples:

```text
source
campaign
utm_source
utm_campaign
affiliate_id
adgroup
keyword
```

Non-advertising examples:

```text
email_version
email_subject_variant
facebook_post
facebook_post_id
instagram_post
instagram_story
influencer_post
checkout_page
checkout_version
landing_page
funnel_step
product_quiz_answer
support_agent
call_center_batch
webinar_id
sms_campaign
shipping_promo
internal_experiment
```

Example metadata pairs:

```json
{
  "name": "email_version",
  "value": "welcome_v3"
}
```

```json
{
  "name": "facebook_post_id",
  "value": "post_987654"
}
```

```json
{
  "name": "instagram_post",
  "value": "spring_reel_02"
}
```

```json
{
  "name": "checkout_page",
  "value": "version_b"
}
```

Because metadata can be any name/value pair, MCP/AI should not assume metadata is advertising-related. Metadata may represent any custom business context the user wanted to store with customers, sales, transactions, subscriptions, or other records.

---

# When To Consider Metadata vs Known Schema Fields

MCP/AI should consider metadata when the user wants to search or report on something that is not an obvious built-in schema property.

Use known schema fields first when the requested concept clearly maps to an existing field.

Use metadata discovery when the requested concept sounds custom, business-specific, campaign-specific, content-specific, experimental, or not obviously present in the schema.

---

## Use Known Schema Fields When They Exist

If the user asks for something that is already a known searchable or reportable field in the item schema, metadata is not needed.

Examples:

```text
Search by customer first name.
Search by customer email.
Search by customer phone.
Search by transaction ID.
Search by gateway transaction ID.
Report sales by customer state.
Report customers by ZIP/postal code.
Report transactions by approved status.
Report subscriptions by status.
```

These concepts correspond to normal schema fields such as:

```text
first_name
last_name
email
phone
state
zip
transaction_id
gateway_transaction_id
approved
status
created_date_unix
```

Example:

```text
User asks: "Find customers named John."
```

This is not a metadata problem because `first_name` is a known customer/search field.

Example:

```text
User asks: "Run a report on sales by customer home state."
```

This is not metadata worth assuming because customer address state exists as a normal schema property.

MCP/AI should use Search operations, item list operations, or BigQuery table fields based on the schema rather than forcing metadata.

---

## Use Metadata Discovery When the Concept Is Custom or Ambiguous

If the user asks for something that does not clearly map to a built-in schema property, MCP/AI should inspect metadata.

Examples:

```text
Sales by affiliate.
Sales by page B.
Revenue by email version.
Orders from Facebook post X.
Customers from Instagram reel 2.
Declines by checkout version.
Refunds by landing page experiment.
Sales from webinar attendees.
Revenue by influencer post.
```

These may map to metadata names/values such as:

```text
affiliate_id = partner_123
checkout_page = version_b
email_version = welcome_v3
facebook_post_id = post_987654
instagram_post = spring_reel_02
landing_page = experiment_a
webinar_id = webinar_2026_05
influencer_post = creator_jane_post_04
```

MCP/AI should use:

```text
GetMetadata
```

to inspect the existing metadata names, then:

```text
GetMetadataEntry
```

to inspect exact values for likely metadata names.

This prevents guessing the wrong name/value pair.

---

# Metadata Discovery Decision Rule

Use this decision rule:

```text
If the requested search/report dimension is an obvious schema field, use the schema field.
If the requested dimension is not an obvious schema field, inspect metadata.
If unsure, inspect both the BigQuery schema and the metadata index before deciding.
```

Recommended workflow for reports:

```text
1. Identify the user’s requested dimension.
2. Check whether it is a known schema property using operation schemas or GetBigQueryTables.
3. If it is a known schema property, use that field directly.
4. If it is not a known schema property, call GetMetadata.
5. For likely metadata names, call GetMetadataEntry to inspect exact values.
6. Use BigQueryRunQuery for reporting/aggregation.
```

Recommended workflow for searches:

```text
1. Identify whether the user wants individual records or a report.
2. If individual records and the term maps to known fields, use the relevant Search operation.
3. If the term may be custom metadata, call GetMetadata and GetMetadataEntry first.
4. Use Search operations for individual record discovery.
5. Use BigQueryRunQuery for exact filtering, grouping, counts, revenue, or other metrics.
```

---

# Examples: Schema Field vs Metadata

| User request | Likely approach | Why |
|---|---|---|
| "Find customers named Sarah" | Search/schema field | `first_name` is a known customer field. |
| "Find sales for customer email jane@example.com" | Search/schema field | `email` is a known field. |
| "Report sales by customer home state" | BigQuery schema field | `state` is a known address/customer field. |
| "Report transactions by approval status" | BigQuery schema field | `approved` is a known transaction field. |
| "Sales by affiliate" | Check metadata | Affiliate is likely custom, such as `affiliate_id`. |
| "Sales by page B" | Check metadata | Page variant is likely custom, such as `checkout_page = version_b`. |
| "Revenue by email version" | Check metadata | Email version is likely custom, such as `email_version`. |
| "Orders from Instagram post 3" | Check metadata | Social post attribution is likely custom metadata. |
| "Declines by checkout version" | Check metadata | Checkout version is likely custom metadata. |

---

# Avoid Metadata Overuse

Metadata is powerful, but MCP/AI should not use it unnecessarily.

Do not convert obvious schema-field questions into metadata questions.

Wrong:

```text
User asks for sales by state.
MCP assumes metadata name = state.
```

Correct:

```text
Use the known address/customer state field if the schema supports it.
```

Wrong:

```text
User asks to search for customer first name Ryan.
MCP checks metadata first.
```

Correct:

```text
Use known customer search fields because first_name is a schema/search field.
```

Use metadata when it is the right tool: custom business dimensions, external attribution, content variants, experiments, campaign labels, and account-specific name/value data.

---

# Search Operations and Metadata

RevCent has multiple `Search...` operations that search previously created records using a single `search_term`.

Examples include:

```text
SearchCustomers
SearchSales
SearchTransactions
SearchSubscriptions
SearchChargebacks
SearchCustomerCards
```

These Search operations use a full-text search engine and many search result schemas include a `metadata` array.

The metadata array contains name/value pairs such as:

```json
[
  {
    "name": "affiliate_id",
    "value": "partner_123"
  },
  {
    "name": "checkout_page",
    "value": "version_b"
  }
]
```

This means metadata can be relevant to Search operations in two ways:

```text
1. Search results may include metadata that matched or helps explain the result.
2. The user's natural-language search/request may actually be referring to metadata, even if the user does not say "metadata."
```

---

## Users Often Describe Metadata Without Knowing It

Users may ask business questions using familiar business terms instead of metadata terminology.

Examples:

| User says | Likely metadata interpretation |
|---|---|
| "sales by affiliate" | Metadata name may be `affiliate_id`. |
| "sales by page B" | Metadata name may be `checkout_page`, value may be `version_b`. |
| "orders from Facebook" | Metadata name may be `source`, `utm_source`, or `traffic_channel`, value may be `Facebook`. |
| "customers from holiday campaign" | Metadata name may be `campaign` or `utm_campaign`, value may be `holiday_campaign` or similar. |
| "show me sales from funnel 2" | Metadata name may be `funnel_name`, `funnel_id`, or `checkout_version`. |
| "transactions from the upsell page" | Metadata name may be `page`, `checkout_page`, `landing_page`, or `funnel_step`. |

The user may not know that the business concept they are describing is stored as metadata.

MCP/AI should recognize when a request may involve metadata, even if the user does not use the word "metadata."

---

## Why the Metadata Index Matters for Search

When the user's request is ambiguous, MCP/AI should inspect the metadata index.

Use:

```text
GetMetadata
```

to see available metadata names.

Then use:

```text
GetMetadataEntry
```

to inspect exact values for a likely metadata name.

This prevents MCP/AI from guessing.

Example:

```text
User asks: "Show me sales by affiliate."
```

MCP should not assume the metadata name is exactly:

```text
affiliate
```

The account may actually use:

```text
affiliate_id
affiliate
partner_id
referrer
source
```

Recommended process:

```text
1. Call GetMetadata.
2. Look for names related to affiliate.
3. If `affiliate_id` exists, call GetMetadataEntry for that metadata ID.
4. Inspect actual affiliate values.
5. Decide whether to use SearchSales, BigQueryRunQuery, or another operation.
```

---

## Example: "Sales by Affiliate"

User request:

```text
How many sales did each affiliate bring in?
```

Likely meaning:

```text
Group sales by metadata name = affiliate_id.
```

Recommended MCP process:

```text
1. Use GetMetadata to discover whether affiliate_id exists.
2. Use GetMetadataEntry to inspect known affiliate_id values.
3. Use GetBigQueryTables to confirm the sale table and metadata field structure.
4. Use BigQueryRunQuery to aggregate sales by affiliate_id.
```

Why not SearchSales alone?

```text
SearchSales can help find individual sales matching a term.
BigQueryRunQuery is better for counts, grouping, metrics, and reporting.
```

---

## Example: "Sales by Page B"

User request:

```text
Show me sales by page B.
```

Likely meaning:

```text
Find or report sales where metadata name = checkout_page and value = version_b.
```

But MCP should verify.

Recommended process:

```text
1. Use GetMetadata to find page-related metadata names.
2. Possible names may include checkout_page, landing_page, page, funnel_page, checkout_version.
3. Use GetMetadataEntry for the most likely entries.
4. Confirm whether value version_b or page_b exists.
5. If the user wants individual matching records, use SearchSales or another relevant search/list operation where appropriate.
6. If the user wants counts, revenue, or reporting, use BigQueryRunQuery.
```

---

## Search Operations vs BigQueryRunQuery

Search operations and BigQuery serve different purposes.

| User goal | Better operation |
|---|---|
| Find individual records matching a phrase or value | Search operation, such as `SearchSales` or `SearchCustomers` |
| Inspect search results and matching highlights | Search operation |
| Count records by metadata value | `BigQueryRunQuery` |
| Revenue by metadata value | `BigQueryRunQuery` |
| Group by affiliate/campaign/source/page | `BigQueryRunQuery` |
| Build dashboards or reports | `BigQueryRunQuery` |
| Discover possible metadata names | `GetMetadata` |
| Discover possible metadata values | `GetMetadataEntry` |

Search is useful for retrieval and discovery.

BigQuery is useful for analytics and aggregation.

---

## Search Operation Metadata Awareness

Several Search operation result schemas include:

```text
metadata
highlights
score
```

The `metadata` array can show the metadata name/value pairs attached to the result.

The `highlights` array can show which fields matched the search term.

This can help MCP/AI understand why an item was returned.

Example search result concept:

```json
{
  "item_type": "sale",
  "id": "XXXXXXXXXXXXXXXXXXXX",
  "email": "customer@example.com",
  "metadata": [
    {
      "name": "checkout_page",
      "value": "version_b"
    }
  ],
  "highlights": [
    {
      "field": "metadata.value",
      "values": [
        "version_b"
      ]
    }
  ],
  "score": 12.5
}
```

MCP/AI should review metadata and highlights in search results when determining whether the user’s requested concept maps to metadata.

---

## Search Workflow When Metadata Is Suspected

When a user asks to search for or query a business concept that might be metadata:

```text
1. Identify whether the phrase sounds like a business dimension, campaign, source, affiliate, funnel, page, variant, coupon, or traffic attribute.
2. Call GetMetadata to inspect available metadata names.
3. If likely names exist, call GetMetadataEntry for exact values.
4. If the user wants individual records, use the appropriate Search operation.
5. If the user wants metrics/reporting, use BigQueryRunQuery.
6. If the exact metadata mapping is ambiguous, present the likely metadata name/value mapping before running the final query.
```

---

## Do Not Guess Metadata Names or Values

MCP/AI should not guess that:

```text
affiliate = affiliate_id
page B = checkout_page: version_b
facebook = source: Facebook
holiday = campaign: HolidaySale
```

without checking the existing metadata index and values.

The account may use different names or casing.

Correct behavior:

```text
Use GetMetadata to find the metadata name.
Use GetMetadataEntry to confirm exact values.
Then use Search or BigQuery with the exact metadata name/value.
```

---

## Practical Decision Examples

### User asks for individual records

```text
"Find sales from affiliate partner_123."
```

Recommended:

```text
1. Check metadata names and values.
2. If affiliate_id = partner_123 exists, use SearchSales or a relevant item search/list path for matching records.
3. If exact filtering is required and SearchSales is too broad, use BigQueryRunQuery or the relevant list operation with metadata filtering if available.
```

### User asks for a report

```text
"How much revenue came from affiliate partner_123?"
```

Recommended:

```text
1. Check metadata names and values.
2. Use GetBigQueryTables to confirm schema.
3. Run BigQueryRunQuery.
```

### User asks an ambiguous question

```text
"How did page B do?"
```

Recommended:

```text
1. Ask what metric is desired if needed: sales, revenue, declines, conversion, refunds, etc.
2. Check metadata names for page-related fields.
3. Check metadata values for version_b/page_b.
4. Use BigQueryRunQuery for metrics or SearchSales for individual sales.
```

# Recommended BigQuery Workflow With Metadata Values

When the user wants a metadata-value-specific report:

```text
1. Use GetMetadata to find the metadata_id for the requested metadata name.
2. Use GetMetadataEntry to retrieve values for that metadata name.
3. Confirm the exact value with the user if there are ambiguous values.
4. Use GetBigQueryTables to inspect the relevant table schemas.
5. Build BigQuery Standard SQL using the confirmed table fields and metadata structure.
6. Run BigQueryRunQuery.
```

---

# Do Not Guess the BigQuery Metadata Field Shape

`GetMetadataEntry` gives MCP/AI the metadata name and values.

It does not reveal how metadata is stored in BigQuery tables.

Before writing SQL, use:

```text
GetBigQueryTables
```

to inspect the schema for the relevant table.

Do not assume metadata is always a repeated record, JSON string, nested object, or separate table.

The BigQuery SQL must be based on the actual table schema returned by `GetBigQueryTables`.

---

# BigQuery SQL Patterns for Metadata Values

The exact SQL depends on the schema returned by `GetBigQueryTables`.

The following examples are conceptual patterns only.

## Pattern A: Repeated Metadata Record

If the table schema shows metadata as a repeated record with `name` and `value`, a conceptual query might be:

```sql
SELECT
  COUNT(*) AS sale_count,
  SUM(IF(amount_total IS NULL, 0, amount_total)) AS revenue
FROM `revcent.user.sale`
WHERE EXISTS (
  SELECT 1
  FROM UNNEST(metadata) AS m
  WHERE m.name = 'source'
    AND m.value = 'Facebook'
)
```

Use only if schema confirms the repeated record shape.

## Pattern B: Group by a Metadata Value

If metadata can be unnested as name/value records:

```sql
SELECT
  m.value AS source,
  COUNT(*) AS sale_count,
  SUM(IF(amount_total IS NULL, 0, amount_total)) AS revenue
FROM `revcent.user.sale`,
UNNEST(metadata) AS m
WHERE m.name = 'source'
GROUP BY source
ORDER BY revenue DESC
```

Use only if schema confirms this pattern.

## Pattern C: JSON Metadata Field

If the schema shows metadata as JSON/string data:

```sql
SELECT
  COUNT(*) AS sale_count
FROM `revcent.user.sale`
WHERE JSON_VALUE(metadata, '$.source') = 'Facebook'
```

Use only if schema confirms this pattern and JSON functions are appropriate.

---

# BigQuery Rules From BigQueryRunQuery Documentation

When using metadata names/values in BigQuery:

```text
Use BigQuery Standard SQL.
Use fully qualified table references.
Wrap table references in backticks.
Use GetBigQueryTables before writing queries.
Optimize queries to avoid the 30-second timeout.
Avoid COALESCE.
When using TIMESTAMP_SUB, only use INTERVAL in DAY.
```

Correct:

```sql
SELECT COUNT(*) AS sale_count
FROM `revcent.user.sale`
```

Incorrect:

```sql
SELECT COUNT(*) AS sale_count
FROM revcent.user.sale
```

---

# Example: User Asks for Values for a Metadata Name

User asks:

```text
What values exist for source?
```

MCP process:

```text
1. Call GetMetadata.
2. Find metadata name = source.
3. Read its metadata_id.
4. Call GetMetadataEntry with metadata_id.
5. Return values.
```

Example response:

```json
{
  "id": "MMMMMMMMMMMMMMMMMMMM",
  "name": "source",
  "enabled": true,
  "values": [
    "Google",
    "Facebook",
    "TikTok",
    "Affiliate"
  ]
}
```

---

# Example: User Wants BigQuery Report by a Metadata Value

User asks:

```text
Show sales from Facebook source for the last 30 days.
```

MCP process:

```text
1. Call GetMetadata to find source.
2. Call GetMetadataEntry for source.
3. Confirm exact value is Facebook.
4. Call GetBigQueryTables to inspect sale table schema.
5. Build the correct metadata SQL using the actual schema.
6. Use TIMESTAMP_SUB with INTERVAL 30 DAY if filtering by recent time.
7. Run BigQueryRunQuery.
```

Conceptual SQL if metadata is repeated name/value records:

```sql
SELECT
  COUNT(*) AS sale_count,
  SUM(IF(amount_total IS NULL, 0, amount_total)) AS revenue
FROM `revcent.user.sale`
WHERE TIMESTAMP_SECONDS(created_date_unix) >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
  AND EXISTS (
    SELECT 1
    FROM UNNEST(metadata) AS m
    WHERE m.name = 'source'
      AND m.value = 'Facebook'
  )
```

Important:

```text
This SQL must be adapted to the actual schema returned by GetBigQueryTables.
```

---

# Example: User Wants Revenue by Campaign

User asks:

```text
Run revenue by campaign.
```

MCP process:

```text
1. Call GetMetadata to find campaign metadata.
2. Call GetMetadataEntry to inspect campaign values.
3. Call GetBigQueryTables to confirm sale table fields and metadata shape.
4. Build grouped BigQuery SQL.
5. Run BigQueryRunQuery.
```

Conceptual SQL if metadata is repeated name/value records:

```sql
SELECT
  m.value AS campaign,
  COUNT(*) AS sale_count,
  SUM(IF(amount_total IS NULL, 0, amount_total)) AS revenue
FROM `revcent.user.sale`,
UNNEST(metadata) AS m
WHERE m.name = 'campaign'
GROUP BY campaign
ORDER BY revenue DESC
```

---

# Example: Values Help Detect Dirty Data

`GetMetadataEntry` can reveal messy or inconsistent values.

Example values for `source`:

```text
Facebook
facebook
FB
Meta
meta
```

This tells MCP/AI that BigQuery reports may need:

- Value normalization
- Multiple filter values
- Case-insensitive grouping
- Business cleanup
- A consistent metadata naming strategy

Example conceptual normalization:

```sql
CASE
  WHEN LOWER(m.value) IN ('facebook', 'fb', 'meta') THEN 'Facebook'
  ELSE m.value
END AS normalized_source
```

Use this only after confirming the metadata field shape.

---

# When to Use GetMetadataEntry

Use `GetMetadataEntry` when:

```text
The user wants values for one metadata name.
The MCP needs exact filter values before BigQuery.
The MCP needs to validate whether a value exists.
The MCP is building a report UI or query prompt.
The MCP is preparing filters for sales, customers, subscriptions, trials, transactions, or other tables.
The MCP needs to inspect value consistency/casing.
The user is asking about a custom/non-schema dimension such as email version, social post, checkout page, affiliate, funnel, experiment, or other account-specific value.
```

---

# When Not to Use GetMetadataEntry

Do not use `GetMetadataEntry` when:

```text
The user wants all metadata names. Use GetMetadata.
The user only knows a metadata name but not metadata_id. Use GetMetadata first.
The user wants actual matching sales/customers/transactions. Use BigQueryRunQuery or relevant list/search operations.
The user wants metrics, counts, revenue, or dashboards. Use BigQueryRunQuery.
The user wants all possible values beyond 500 unique values. Use BigQueryRunQuery or export/reporting.
The user wants to insert metadata. Use InsertMetadata.
```

---

# MCP Validation Checklist

Before calling `GetMetadataEntry`:

1. `metadata_id` is present.
2. `metadata_id` is 20 characters.
3. MCP has confirmed this is the correct metadata entry.
4. If the user only gave a name, MCP has called `GetMetadata` first.
5. MCP understands values are capped at 500 unique values.
6. MCP understands this operation does not return matching items.
7. MCP understands this operation does not run reports.
8. MCP has considered whether the requested dimension is an obvious schema field before treating it as metadata.
9. If BigQuery is the next step, MCP will call `GetBigQueryTables` before writing SQL.
10. MCP will not guess metadata field structure inside BigQuery tables.

---

# Key Takeaways

```text
GetMetadataEntry returns one metadata name plus saved values.
```

```text
A maximum of 500 unique values are returned.
```

```text
Use GetMetadata first when only the metadata name is known.
```

```text
GetMetadataEntry is useful before BigQueryRunQuery because it reveals exact metadata values for filters and grouping.
```

```text
Use BigQueryRunQuery for actual reports, metrics, counts, aggregations, and joins.
```

```text
Use GetBigQueryTables before writing metadata SQL because GetMetadataEntry does not reveal BigQuery field structure.
```


---
Document Parent Directory
* [Operations](https://revcent.com/documentation/markdown/mcp/operation/index.md) - AI/MCP details and overviews for operations available within the RevCent MCP.