mcp-v3-provider-context
Skill20 starsChanged 4 days agoMITView on GitHub
Разрешать provider scope в LidFly MCP v3 через get_provider_context и resolve_campaign_scope. Использовать вместе с provider-скиллом, когда кабинет, подключение, кампания или workspace_project_id не заданы точно либо пользователь называет объект по имени.
In this repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-markers-removeSkill
- article-reviserSkill
- article-writerSkill
- avito-adsSkill
- avito-businessSkill
- demand-researchSkill
- export-ad-reportsSkill
- human-editorial-polishSkill
- lidfly-connection-doctorSkill
- lidfly-knowledge-maintainerSkill
- lidfly-page-migrationSkill
- lidfly-site-commerceSkill
- lidfly-support-escalationSkill
- max-postingSkill
- restaurant-yandexSkill
- semantic-coreSkill
- seo-optimizerSkill
- serp-monitorSkill
- telegram-postingSkill
- video-article-writerSkill
- vk-ads-campaign-builderSkill
- vk-social-communitySkill
- workspace-project-managerSkill
- yandex-direct-campaign-builderSkill
- yandex-edaSkill
- yandex-metrikaSkill
- yandex-productsSkill
- yandex-webmasterSkill
- youtube-video-seoSkill
- ai-markers-removeSkill
- article-reviserSkill
- article-writerSkill
- avito-adsSkill
- avito-businessSkill
- demand-researchSkill
- export-ad-reportsSkill
- human-editorial-polishSkill
- lidfly-connection-doctorSkill
- lidfly-knowledge-maintainerSkill
- lidfly-page-migrationSkill
- lidfly-site-commerceSkill
- lidfly-support-escalationSkill
- max-postingSkill
- mcp-v3-provider-contextSkill
- restaurant-yandexSkill
- semantic-coreSkill
- seo-optimizerSkill
- serp-monitorSkill
- telegram-postingSkill
- video-article-writerSkill
- vk-ads-campaign-builderSkill
- vk-social-communitySkill
- workspace-project-managerSkill
- yandex-direct-campaign-builderSkill
- yandex-edaSkill
- yandex-metrikaSkill
- yandex-productsSkill
- yandex-webmasterSkill
- youtube-video-seoSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this helper before any provider task where the account, client, connection, campaign, or Workspace project is not already exact.
- Very specific: line 17
Read each internal tool schema with get_tool_schema before its first call.
- Very specific: line 19
Read with call_tool; write with call_write_tool.
- Very specific: line 21
Call search_tools, get_tool_schema, get_provider_context, and resolve_campaign_scope directly.
- Very specific: line 25
Do not infer client_login, client_id, account_id, counter_id, host_id, or connection_id from a human name.
- Very specific: line 30
If resolve_campaign_scope returns candidates, ask for the exact workspace_project_id or campaign id.
- Distinctive: line 33
If provider context says a tool is available only in a selected Пространство, fail closed and ask for that project id.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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? }); - exact Yandex Direct login known:
get_provider_context({ provider: "yandex", query?, client_login }). - campaign named by user:
resolve_campaign_scope({ provider, query, workspace_project_id? }).
- account/client/project unknown:
- Find internal provider tools with
search_tools, passing resolved provider/project scope when supported. - Read each internal tool schema with
get_tool_schemabefore its first call. - Copy only returned
tool_args,scope_arguments, ornext_call.argumentsinto the internal provider call. - Read with
call_tool; write withcall_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, orconnection_idfrom a human name. queryis free project/name/INN/display-identifier search. For Yandex, put an exact Direct login only inclient_login; both fields may be sent together and are resolved independently.- Legacy clients may still put a syntactically valid Yandex login in
query, but it is only a compatibility candidate and must pass the same exact live-directory check. - Inspect
scope_issues. Automatically execute only a read-onlynext_actionwithmay_execute_automatically=true. Never bypassmanual_scope_review, ambiguity, conflict, directory outage, or login-not-found by guessing arguments. - An
external_entity_key, project name, orexternal_entity_nameis never executableclient_login; copy only returnedtool_args,scope_arguments, ornext_call.arguments. - If
resolve_campaign_scopereturns candidates, ask for the exactworkspace_project_idor campaign id. - If it returns
not_observed, use its typeddiagnosis:api_visibilityrecords exactly which public sources returned no object or rows, while successful provider access rules out an observed OAuth failure only forchecked_scopes. Readchecked_scopes[].selection:explicitmeans the caller named that cabinet throughconnection_idorclient_login;workspace_project_idalone is a memory boundary and always staysdiscovered. When every checked scope isexplicit,yandex_client_login.status=not_required_for_explicit_scopeandnext_action.kind=none: do not propose reconnecting OAuth, another period, anotherclient_login, or the same reads without new evidence. When any scope wasdiscoveredand another Yandex account is genuinely possible,yandex_client_login.status=provide_if_campaign_is_in_another_account: request its exactclient_login, and after informed confirmation use only the preparedsave_yandex_client_accountwrite call, then resolve again. Branch on the typedstatus, never onreasonprose. Do not infer an unsupported campaign type or an empty web account from an empty API result. - For campaign write in agency/team Пространства, include
workspace_project_idunless 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, optionalclient_login. - Metrika:
counter_id, optionalconnection_id; noclient_login. - VK Ads:
connection_id, optionalclient_id. - Avito Ads:
connection_id, optional 9-digitaccount_id. - Yandex Webmaster: start with
webmaster_get_hosts, thenhost_id; noclient_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.
At the end of provider work distinguish what was read/verified, the project/provider scope, what was prepared versus executed, what was actually saved in project memory, and writes still awaiting confirmation. Report only successful tool-backed persistence; do not reveal internal model/provider routing. This reporting method preserves the client-template audit trail (reviewed 2026-10-09) without requiring local template files.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

