fastmcp-gsuite
AGENTS.md9 starsChanged 11 months agoMITView on GitHub
These instructions are for AI assistants working in this project. Always open @/openspec/AGENTS.md when the request: - Mentions planning or proposals (words like proposal, spec, change, plan) - Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work - Sounds ambiguous and you need the authoritative spec before coding Use @/openspec/AGENTS.md to learn: - How to create and apply change proposals - Spec format and conventions - Project structure and guidelines Keep this managed block so 'openspec update' can…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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.
- openspec/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
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
- Very specific: line 6
Always open @/openspec/AGENTS.md when the request:
- Very specific: line 11
Use @/openspec/AGENTS.md to learn:
- Distinctive: line 16
Keep this managed block so 'openspec update' can refresh the instructions.
- Very specific: line 66
Use Annotated[type, "description"] for function parameters
- Very specific: line 67
Use str | None instead of Optional[str] (PEP 604)
- Very specific: line 68
Use list[T] instead of List[T] (built-in generics)
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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.
Files
<!-- OPENSPEC:START -->OpenSpec Instructions
These instructions are for AI assistants working in this project.
Always open @/openspec/AGENTS.md when the request:
- Mentions planning or proposals (words like proposal, spec, change, plan)
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
- Sounds ambiguous and you need the authoritative spec before coding
Use @/openspec/AGENTS.md to learn:
- How to create and apply change proposals
- Spec format and conventions
- Project structure and guidelines
Keep this managed block so 'openspec update' can refresh the instructions.
<!-- OPENSPEC:END -->Development Guide
Build & Test Commands
# Dependencies
make install # Install all dependencies
uv sync --dev # Sync dev dependencies
# Lint & Format
make lint # Run ruff + mypy
make fix-lint # Auto-fix with ruff, black, isort
make format # Format with black + isort
# Testing
make test # Run unit tests (excludes e2e)
uv run pytest tests/unit # Run unit tests only
uv run pytest tests/unit/test_gmail_tools.py::TestGmailTools::test_query_gmail_emails_success # Run single test
make coverage # Run with coverage report
# E2E Tests (requires credentials)
make e2e-tests # Run all E2E tests
dotenvx run -f .env.local -- uv run pytest tests/e2e/test_gmail_api.py -v # Single E2E test fileCode Style Guidelines
Imports: Standard library → third-party → local modules (ruff + isort enforce this)
import json
import logging
from typing import Annotated
from fastmcp import Context
from mcp.types import TextContent
from . import auth_helper
from .common import get_user_id_descriptionFormatting:
- Line length: 120 chars
- Quote style: double quotes
- Python 3.13 syntax (requires-python >= 3.13)
Type Hints:
- Use
Annotated[type, "description"]for function parameters - Use
str | Noneinstead ofOptional[str](PEP 604) - Use
list[T]instead ofList[T](built-in generics)
Naming:
- Functions/variables:
snake_case - Classes:
PascalCase - Constants:
UPPER_SNAKE_CASE - Private: prefix with
_
Error Handling:
try:
# operation
except Exception as e:
logger.error(f"Error in function_name: {e}", exc_info=True)
error_msg = f"Error message: {e}"
if ctx:
await ctx.error(error_msg)
raise RuntimeError(error_msg) from eTesting:
- Unit tests use
unittest.TestCaseand mocks - E2E tests marked with
@pytest.mark.e2e - Async tests require
pytest-asyncio - Mock external services (Gmail, Calendar APIs)
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.

