Skip to main content
Glama

Connect (or replace) a project's AI keys

seo_project_connect_ai
Idempotent

Stores the AI provider key this project's generation, audits and research run on — BYOK: the tokens bill YOUR provider account, not ours. Recommended: a Google Gemini API key (aistudio.google.com/apikey); its free tier works with no card. Optionally stores a Perplexity API key to enable citation-bearing AI visibility checks. Keys are stored encrypted and can never be read back — only replaced or cleared. FREE — this call costs nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aiModelNoOptional model id; defaults to gemini-2.5-flash on the Gemini endpoint.
aiApiKeyNoThe AI provider key to store (replaces any stored one). Omit to leave unchanged.
aiBaseUrlNoOptional OpenAI-compatible base URL; defaults to Google's Gemini endpoint.
projectIdYesThe project id, exactly as returned by seo_project_list (a cuid such as 'cmtjyi1q20000l204octn48ai'). Not the slug, not the display name. If you do not have one, call seo_project_list first.
clearAiKeyNoPass true to REMOVE the stored AI key — generation stops until a new one is connected.
perplexityApiKeyNoOptional Perplexity API key for visibility checks; replaces any stored one. Omit to leave unchanged.
clearPerplexityKeyNoPass true to REMOVE the stored Perplexity key.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteYes
projectIdYes
aiKeyConnectedYes
perplexityKeyConnectedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

The description discloses key behaviors beyond the annotations: keys are stored encrypted and can never be read back, only replaced or cleared; tokens bill the caller's provider account (BYOK); and the call is free. These are substantive behavioral traits that the annotations (readOnlyHint, idempotentHint, destructiveHint) do not capture.

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 compact—three sentences—and front-loads the core purpose before layering billing, key recommendation, and security context. Each sentence adds a distinct piece of information with minimal filler, though the 'FREE' note is slightly redundant with the BYOK billing point.

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?

With seven parameters, an output schema, and these annotations, the description still covers the essential context: purpose, recommended key type, optional Perplexity key, encryption/no-read-back, and cost. It omits error/edge-case behavior, but the rich input/output schemas cover remaining details, making this adequate for an agent to call correctly.

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 high-level context (BYOK, encrypted storage, what the keys power) but does not detail individual parameter semantics beyond the schema. Those details are already well covered in the input schema, so no additional credit is warranted.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Stores') and a precise resource (the AI provider key that a project's generation, audits, and research run on), and the title makes the connect-or-replace function explicit. The optional Perplexity key adds a second distinct purpose (citation-bearing visibility checks), which clearly separates it from the sibling action tools.

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

Usage Guidelines4/5

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

The description gives actionable usage context: it recommends a Google Gemini API key, notes the free tier needs no card, and specifies when the optional Perplexity key is needed (citation-bearing AI visibility checks). It does not explicitly name alternatives or state when not to use it, but the purpose is so distinct from the siblings that the context is clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources