MCP v3 Provider Context
Use this helper before any provider task where the account, client, connection, campaign, or Workspace project is not already exact.
Required Sequence
- Resolve provider scope with the top-level meta-tools:
- account/client/project unknown:
get_provider_context({ provider, query? });
- campaign named by user:
resolve_campaign_scope({ provider, query, workspace_project_id? }).
- Find internal provider tools with
search_tools, passing resolved provider/project scope when supported.
- Read each internal tool schema with
get_tool_schema before its first call.
- Copy only returned
tool_args, scope_arguments, or next_call.arguments into the internal provider call.
- Read with
call_tool; write with call_write_tool.
Call search_tools, get_tool_schema, get_provider_context, and resolve_campaign_scope directly. Never pass these top-level meta-tools as tool_name to call_tool or call_write_tool.
Scope Rules
- Do not infer
client_login, client_id, account_id, counter_id, host_id, or connection_id from a human name.
- If
resolve_campaign_scope returns candidates, ask for the exact workspace_project_id or campaign id.
- For campaign write in agency/team Пространства, include
workspace_project_id unless preflight returned one unambiguous scope.
- If provider context says a tool is available only in a selected Пространство, fail closed and ask for that project id.
Provider Keys
- Yandex Direct:
connection_id, optional client_login.
- Metrika:
counter_id, optional connection_id; no client_login.
- VK Ads:
connection_id, optional client_id.
- Avito Ads:
connection_id, optional 9-digit account_id.
- Yandex Webmaster: start with
webmaster_get_hosts, then host_id; no client_login.
- LidFly sites:
subdomain, site id, or store id from returned tool args.
Output
Tell the user which scope was selected in human terms and include the exact id only when useful for audit: workspace_project_id, provider account, campaign id. Do not expose tokens or secrets.
1---2name: mcp-v3-provider-context-33description: Разрешать provider scope в LidFly MCP v3 через get_provider_context и resolve_campaign_scope. Использовать вместе с provider-скиллом, когда кабинет, подключение, кампания или workspace_project_id не заданы точно либо пользователь называет объект по имени.4---56# MCP v3 Provider Context78Use this helper before any provider task where the account, client, connection, campaign, or Workspace project is not already exact.910## Required Sequence11121. Resolve provider scope with the top-level meta-tools:13 - account/client/project unknown: `get_provider_context({ provider, query? })`;14 - campaign named by user: `resolve_campaign_scope({ provider, query, workspace_project_id? })`.152. Find internal provider tools with `search_tools`, passing resolved provider/project scope when supported.163. Read each internal tool schema with `get_tool_schema` before its first call.174. Copy only returned `tool_args`, `scope_arguments`, or `next_call.arguments` into the internal provider call.185. Read with `call_tool`; write with `call_write_tool`.1920Call `search_tools`, `get_tool_schema`, `get_provider_context`, and `resolve_campaign_scope` directly. Never pass these top-level meta-tools as `tool_name` to `call_tool` or `call_write_tool`.2122## Scope Rules2324- Do not infer `client_login`, `client_id`, `account_id`, `counter_id`, `host_id`, or `connection_id` from a human name.25- If `resolve_campaign_scope` returns candidates, ask for the exact `workspace_project_id` or campaign id.26- For campaign write in agency/team Пространства, include `workspace_project_id` unless preflight returned one unambiguous scope.27- If provider context says a tool is available only in a selected Пространство, fail closed and ask for that project id.2829## Provider Keys3031- Yandex Direct: `connection_id`, optional `client_login`.32- Metrika: `counter_id`, optional `connection_id`; no `client_login`.33- VK Ads: `connection_id`, optional `client_id`.34- Avito Ads: `connection_id`, optional 9-digit `account_id`.35- Yandex Webmaster: start with `webmaster_get_hosts`, then `host_id`; no `client_login`.36- LidFly sites: `subdomain`, site id, or store id from returned tool args.3738## Output3940Tell the user which scope was selected in human terms and include the exact id only when useful for audit: `workspace_project_id`, provider account, campaign id. Do not expose tokens or secrets.