Pre-Black Friday: 20% off, for as long as you stayEARLYBFon Solo and AgencyEnds Nov 28Start free

How-to guide

How to Size Your TAM (in Gemini CLI)

One gemini mcp add command, then free counts that narrow a market from TAM to a buyer list you can work. No API key pasted into chat.

Get your free API key →Free to start. No credit card. 1,000 records to spend whenever you like.

TL;DR

  • Gemini CLI reaches LeadOcean through one gemini mcp add command and a browser sign-in. It then runs a free count for every filter set you describe.
  • It takes about 15 minutes. The sizing run spends 0 of your records, because counts and lookups are free.
  • TAM, SAM and SOM become four exact counts. Only people returned by a search or export cost a record.

Prerequisites

  • A LeadOcean account from app.leadocean.io. The free plan has no card and gives 1,000 records, one-off.
  • Gemini CLI installed, on a machine with a browser. The Gemini CLI MCP docs, September 2026, say OAuth needs a browser and a localhost redirect. It will not work over plain SSH.
  • One thing to check first. The same docs carry a notice that Gemini CLI was replaced by Antigravity CLI on June 18th, 2026 for unpaid tier and Google One users. If that is you, this recipe may not apply.
  • Optional, for the REST check in Step 6: curl, jq and a key in your shell as $LEADOCEAN_API_KEY. The chat steps need no key.
bash
export LEADOCEAN_API_KEY="paste-your-key-here"

Step 1: Add the LeadOcean MCP server

Gemini CLI has an mcp add command for remote servers. The docs list --transport http for streamable HTTP. Add --scope user to load the server in every folder.

bash
gemini mcp add --transport http --scope user leadocean https://api.leadocean.io/mcp
gemini mcp list

You can write the same entry by hand in settings.json. The docs name the field httpUrl.

json
{
  "mcpServers": {
    "leadocean": {
      "httpUrl": "https://api.leadocean.io/mcp"
    }
  }
}

Do not add a headers block. LeadOcean signs you in with OAuth 2.1, so nothing is pasted. Keep the server name free of underscores, since the docs say Gemini CLI splits tool names on the first underscore after mcp_.

Step 2: Sign in and fence off spending

Start gemini and run the auth command from the docs. Your browser opens on LeadOcean. Approve, then return to the terminal.

text
/mcp auth leadocean
/mcp

The /mcp command lists the server's tools. LeadOcean has 13, and seven never spend records: count leads, count companies, filter list, enum list, account, get export and list exports.

A sizing run needs none of the spending tools. Hide them with excludeTools in the server entry. The docs say excluded tools are hidden from the model.

json
{
  "mcpServers": {
    "leadocean": {
      "httpUrl": "https://api.leadocean.io/mcp",
      "excludeTools": [
        "leadocean_search_leads",
        "leadocean_get_lead",
        "leadocean_find_phone",
        "leadocean_get_company",
        "leadocean_search_companies",
        "leadocean_export_leads"
      ]
    }
  }
}

Restart gemini after the edit. Remove the list when you want to pull real rows.

Step 3: Write the buyer and resolve exact values

A market size is only as good as the buyer definition behind it. Write one sentence that names the industry, company size and role. Then make Gemini look up each value, because filters take exact strings.

text
Buyer: IT leaders (VP or C-level, Information Technology) at financial services
companies with 201 to 1,000 employees. Product: a security tool. Question: how
big is the market, how much can I reach from the US, and how many VPs is that?

Use leadocean_list_enum_values to find the exact strings for industry
(financial), job_function (information technology), job_level and
employee_range. Show me the values you will use. Call no tool that spends records.

For this buyer it should settle on these values.

json
{
  "industry": ["Financial Services"],
  "jobFunction": ["Information Technology"],
  "jobLevel": ["VP", "C-Team"],
  "employeeRange": ["201-500", "501-1000"]
}

Step 4: Count TAM, SAM and SOM

Ask for one count per tier. Each tier keeps the filters above it and adds one. The prompt tells Gemini to use only the free count tools and to label each number.

text
Use leadocean_count_leads with facets false for four counts.
1. TAM: jobLevel VP and C-Team, jobFunction Information Technology,
   industry Financial Services. No size or country filter.
2. Add employeeRange 201-500 and 501-1000.
3. SAM: add country US.
4. SOM pool: same as 3, but jobLevel VP only.
Put the results in a table with the exact filters beside each count. Say which
email statuses were counted.

A count is a people count. Dollars come from accounts, not people, so the next step counts companies.

Step 5: Count the accounts behind SAM

Sell to companies, not to people. leadocean_count_companies counts companies for free and breaks the total down by industry, headcount band, HQ country, HQ state and NAICS. It is one of the seven free tools, so it survives the excludeTools list.

text
Use leadocean_count_companies with industry Financial Services, employeeRange
201-500 and 501-1000, hqCountry US. Give me the total, the split by headcount
band and the top five HQ states. Then multiply the total by $24,000, my annual
contract value, and label the result as a dollar SAM.

Use your own contract value in the prompt. LeadOcean holds no figure for your product, so Gemini should never guess one. The company count says how many accounts you could sell to. The people count says how many buyers you could write to inside them.

Step 6: Check one count over REST

You can reproduce a chat count from a terminal. The sizing call is a search with count=true as a query parameter and limit set to 1. The body is flat JSON with arrays.

bash
curl -s "https://api.leadocean.io/v1/people/search?count=true" \
  -H "x-api-key: $LEADOCEAN_API_KEY" -H "content-type: application/json" \
  -d '{
    "jobLevel": ["VP", "C-Team"],
    "jobFunction": ["Information Technology"],
    "industry": ["Financial Services"],
    "employeeRange": ["201-500", "501-1000"],
    "country": ["US"],
    "emailStatus": ["verified", "catch_all_valid", "catch_all"],
    "limit": 1
  }' | jq '.meta'

The REST total is capped at 100,000. For a bigger market, use the MCP count tool, which says when it stopped at the cap. The call is free and returns no rows.

What you get

We ran the four counts from Step 4 on 2026-10-21 with leadocean_count_leads. Each one spent 0 records.

TierFilters addedMailable peopleAll people (totalAll)Employers
TAMVP and C-Team, Information Technology, Financial Services10,10622,8992,923
Narrowed+ employeeRange 201-500 and 501-10001,4134,003782
SAM+ country US7661,922394
SOM poolVP only172392100

The mailable column counts people with a verified, catch_all_valid or catch_all email, which is the tool's default. The totalAll column is the same filters with no email condition. Employers is distinctCompanies, how many companies those people work at.

The SAM call returned this shape.

json
{
  "total": 766,
  "totalIsExact": true,
  "totalAll": 1922,
  "distinctCompanies": 394,
  "credits": 0,
  "sample": 1,
  "hasMore": true,
  "source": "leadocean",
  "unsupportedFilters": []
}

The Step 5 company count, run the same day, returned 3,104 US financial services companies with 201 to 1,000 employees: 2,266 in the 201-500 band and 838 in 501-1000. California (443), New York (439) and Texas (262) lead the HQ states. Only 394 of those 3,104 employ a mailable VP or C-level IT leader in our data, which is the gap between your account SAM and your reachable SAM.

Read the table as a funnel. Of 1,413 mid-size IT leaders, 766 sit in the US, and 172 of those are VPs. Your numbers will move as the data refreshes, so date every count you publish.

The counts leave out funding, revenue and headquarters filters, which the count tool does not support. Those narrow the list further at search time. Total spend for the run: 0 records. The optional 5-row spot-check, with the six tools above restored, would cost 5.

Troubleshooting

ErrorCauseFix
leadocean shows DisconnectedOAuth needs a local browser and a localhost redirectRun on a machine with a browser, then /mcp auth leadocean again.
401Missing, wrong or revoked key on a REST callRe-copy the key from app.leadocean.io and export $LEADOCEAN_API_KEY again.
429Above your plan's rate: 5 requests a second on Free, 50 on Solo, 200 on Agency, per accountWait the Retry-After seconds, then slow the loop. Five counts need nothing near that rate.
402Free plan: the 1,000 records are spentCounts stay free. Check GET /v1/account, or move to Solo ($97 a month) or Agency ($497 a month) on pricing. Free records do not reset.
Empty results or a count of 0A filter value outside the catalogue, such as industry: "Finance"Ask Gemini to call leadocean_list_enum_values and use the exact string it returns.
Total stops at 100,000The REST count is capped at 100,000Use leadocean_count_leads, or add a filter and count the pieces.

FAQ

How many records does sizing a TAM in Gemini CLI cost?

Zero. People counts, company counts, filter lookups and enum lookups are free, however many you run. Records are spent only on people returned by a search, a lookup or an export.

Is a people count the same as a market size?

No. It is the number of reachable buyers in a segment. Multiply accounts by your contract value to get dollars, and use your own price for that step.

Why does the count say "mailable"?

The count tool defaults to verified, catch_all_valid and catch_all emails. Pass emailStatus, hasEmail or reachable to change that. Say which one you used next to every number.

Does Gemini CLI see my API key?

Not through MCP. The server uses OAuth sign-in and nothing is pasted into chat. Only the optional REST check reads $LEADOCEAN_API_KEY from your shell.

Can I do this in another coding tool?

Yes. The same MCP URL works elsewhere. See Codex, Windsurf and VS Code. Setup details for every client are on the MCP server page, plans on pricing, and more recipes in the blog hub.

Size your market in Gemini CLI, free

Free to start. No credit card. 1,000 records to spend whenever you like.

Get your free API key →