microsoft-planner-mcp python.instructions.md

A set of conventions for writing Python source code, including module structure, asynchronous code, imports, comments, and patterns used with FastMCP and Microsoft Graph.

In plain words
What is it for?
Use it when creating or modifying Python modules, especially code that uses FastMCP, Microsoft Graph, authentication, pagination, retries, or logging.
Why use it?
It keeps Python changes consistent with the project's structure and makes less obvious implementation choices easier to review.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/aixolotl/microsoft-planner-mcp/python
Clone the repo
git clone --depth 1 https://github.com/aixolotl/microsoft-planner-mcp

Made for: GitHub Copilot.

Per session 1,100 This file is loaded in full into every session.
When invoked 1,100 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01100 $0.01100
Opus 5 $0.00550 $0.00550
Sonnet 5 $0.00220 $0.00220
Haiku 4.5 $0.00110 $0.00110

Measured 2d ago against content hash adfeb5397d32, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

microsoft-planner-mcp python.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/instructions/python.instructions.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Source Conventions

Module Header

Every module starts with from __future__ import annotations.

Commenting Convention

Non-obvious decisions must include an inline comment that answers three questions:

  1. Why it exists — the intent behind the choice
  2. What breaks without it — the failure mode if it is removed or changed
  3. Docs link — a URL the next developer can read for full context

Format (single line for short explanations, multi-line for more complex ones):

# <brief what/why>. Without this, <failure mode>.
# Docs: https://...

Apply to:

  • Auth guards (get_access_token() is None checks)
  • Error-code filtering (if exc.response_status_code != 403:)
  • ETag retry logic
  • Magic strings (orderHint: " !")
  • Middleware registration calls
  • Any SDK pattern that is non-obvious from the code alone (e.g. fresh HeadersCollection(), paginate() over bare .get())
  • Sentinel values ("*all", select=None)

Do not add comments to obvious code (simple assignments, straightforward returns).

Client Logging (ctx)

Use get_optional_context() from src.deps to access the MCP context inside a tool. This is a project-level wrapper around get_context() from fastmcp.server.dependencies that returns None instead of raising RuntimeError when called outside a request (e.g. in unit tests):

from fastmcp.server.dependencies import get_access_token

from ..deps import get_optional_context

ctx = get_optional_context()

if ctx is not None:
    await ctx.info("Fetching items...")

Do not use the raw try/except RuntimeError pattern inline — use get_optional_context() instead. Do not add ctx: Context | None = None to tool signatures — it leaks internal plumbing to LLM clients.

Use ctx.info() for user-visible progress on multi-step or paginated operations. Use ctx.debug() for single fast calls where intermediate state is not interesting to the user. Docs: https://gofastmcp.com/servers/context#via-get_context-function

Read the full file on GitHub · 118 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 118 lines · 1,100 tokens per session scan A adfeb5397d32

Subscribe to this mod's changes

microsoft-planner-mcp python.instructions.md is an instructions file published in the GitHub repository aixolotl/microsoft-planner-mcp (11 stars, last pushed 2mo ago), licensed MIT. It adds 1,100 tokens to every session, about $0.0055 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.