agentleFS
thenavidmthenavidm/google-search-console-mcp-cli/AGENTS.md

google-search-console-mcp-cli

AGENTS.md1 starsChanged 38 days agoMITView on GitHub

For an agent editing this server. Installation and usage live in the README. Tests never touch the network and never need a token. A test that needs credentials is a test nobody runs, CI least of all. tests/helpers.ts has the faked fetch every test goes through. Writes are on by default. Only delete_site and delete_sitemap require confirm. Adding confirm to submit_sitemap would teach a model to pass it reflexively, which is worse than not having it. Gating hides, rather than…

  • Installs packages
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository2 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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
  1. Very specific:

    Writes are on by default: Only delete_site and delete_sitemap require confirm.

    line 35
  2. Very specific:

    Property strings are normalized in api/client.ts, once: Do not add per-tool normalization.

    line 44
  3. Very specific:

    Every default window ends three days back: Search Console finalises data on a lag and a window ending today reads as a broken connector.

    line 47
  4. Very specific:

    Do not write to stdout from the stdio transport.

    line 86
  5. Very specific:

    Do not add a mobileFriendlyTest tool.

    line 90
  6. Distinctive:

    Do not let a failed audit-log write fail the action it was recording.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Working on this repo

For an agent editing this server. Installation and usage live in the README.

Run it

npm install
npm run build
npm test           # vitest, no network, no credentials
npm run typecheck
node dist/index.js doctor

Tests never touch the network and never need a token. A test that needs credentials is a test nobody runs, CI least of all. tests/helpers.ts has the faked fetch every test goes through.

Layout

src/index.tsstarts the app; turns 0.2's --host and PORT into the settings Slipway reads
src/app.tsthe app Slipway serves: settings, doctor, login, logout, accounts
src/instructions.tsthe instructions string
src/config.tsthe settings every tool reads
src/auth.tsthe three credential routes, the loopback login, refresh
src/safety.tswhat a tool can change, and injection framing
src/api/client.tsthe HTTP layer, error mapping, property normalization
src/tools/one module per group, grouped by what they reach
src/format/rows.tsshaping API output for a model

Decisions already made

Writes are on by default. Only delete_site and delete_sitemap require confirm. Adding confirm to submit_sitemap would teach a model to pass it reflexively, which is worse than not having it.

Gating hides, rather than refuses. Slipway leaves writes off the list under GSC_READ_ONLY, and the two deletes under GSC_ALLOW_DESTRUCTIVE=0. An error saying "writes are disabled" is an invitation to try a different tool; an absent tool is not.

Property strings are normalized in api/client.ts, once. Do not add per-tool normalization.

Every default window ends three days back. Search Console finalises data on a lag and a window ending today reads as a broken connector. DATA_LAG_DAYS in format/rows.ts is the single place that number lives.

Average position is weighted by impressions in totals(). A plain mean lets a three-impression query move the number as much as a thirty-thousand-impression one.

Adding a tool

Register it through the tool() helper in src/tools/shared.ts. src/tools/kit.ts turns each spec into a Slipway tool: it resolves the token for the account a call names, and Slipway applies read-only, confirmation, annotations and the audit log from the kind. A confirmed tool needs a consequence in CONSEQUENCES there, in the words its refusal should say.

Pick the kind honestly. read for anything that changes nothing, destructive only for what cannot be undone.

The description is the interface. A model reads it and cannot see the code, so say what the tool reaches, what it costs, and what will surprise the caller. Platform constraints belong in the description, not only in the README: quota limits and the property-string trap prevent a whole class of failed calls when they are stated where the model reads them.

Before claiming it works

npm test is not enough. Run a real client handshake:

npm run build
node dist/index.js doctor

and connect it from an actual MCP client. A tool can build, typecheck and pass unit tests while failing to register.

Do not

Do not write to stdout from the stdio transport. stdout is the JSON-RPC channel and a stray console.log corrupts it, which surfaces as the client seeing no tools at all and no error anywhere.

Do not add a mobileFriendlyTest tool. It is still in Google's discovery document but the service was retired, so it returns errors.

Do not let a failed audit-log write fail the action it was recording. It is a record, not a control.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.