last9-mcp-server AGENTS.md

last9-mcp-server AGENTS.md is an instructions file for Codex, OpenCode from last9/last9-mcp-server. It costs 1,203 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for last9-mcp-server, a Go server that provides tools through the Model Context Protocol (MCP), a standard way for AI agents to use software tools.

In plain words
What is it for?
Use them when adding or changing an MCP tool, its description, or its tool group. They explain which files to edit and which registration path to use.
Why use it?
They keep tool descriptions, registration, filtering, and error handling in the expected places, reducing the chance that a new tool is unavailable or incorrectly configured.

Instructions file for CodexOpenCode

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/last9/last9-mcp-server/agents-md
Clone the repo
git clone --depth 1 https://github.com/last9/last9-mcp-server

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for last9-mcp-server AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/last9/last9-mcp-server/agents-md.svg)](https://agentmods.dev/instructions/last9/last9-mcp-server/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/last9/last9-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/last9/last9-mcp-server/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,203 This file is loaded in full into every session.
When invoked 1,203 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.01203 $0.01203
Opus 5 $0.00602 $0.00602
Sonnet 5 $0.00241 $0.00241
Haiku 4.5 $0.00120 $0.00120

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

Security

Grade A, and why

last9-mcp-server AGENTS.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 5d 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.

AGENTS.md · 62 lines

How it starts

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

last9-mcp-server — agent instructions

Canonical agent guidance for this repo. CLAUDE.md is a compatibility shim that includes this file — edit here, not there.

Adding or changing an MCP tool

Tool descriptions: one style, no exceptions

All tool description text lives as markdown in internal/prompts/descriptions/, embedded via go:embed in internal/prompts/prompts.go. Never define description text as Go string constants in handler packages.

For a new tool get_foo:

  1. Write internal/prompts/descriptions/get_foo.md — the complete tool description.

  2. Add to internal/prompts/prompts.go:

    //go:embed descriptions/get_foo.md
    var GetFooDescription string
    
  3. Register in tools.go with reg(registerIfAllowed(server, cfg.AllowedTools, &mcp.Tool{Name: "get_foo", Description: prompts.GetFooDescription}, foo.NewGetFooHandler(client, cfg))), and add get_foo to its domain in internal/toolsets/toolsets.go.

    Never call last9mcp.RegisterInstrumentedTool directly from tools.go. registerIfAllowed is what enforces --toolsets filtering, surfaces registration errors instead of discarding them, and recovers the SDK's panic on an invalid tool schema. A tool registered directly leaks into every toolset — verify with go run . dump-tools --toolsets=<other-domain> that the new tool is absent.

Progressive disclosure (whales): get_logs, get_traces, get_service_logs, and prometheus_range_query serve a short description (*_base.md) with firing blurb + critical rules + a last9://reference/... pointer. Full manuals live in internal/prompts/references/ (logjson.md, tracejson.md, service_logs.md, metrics.md), embedded and registered as MCP resources in resources.go. Do not concatenate long manuals back into tools/list. Do not inject org attribute catalogs into descriptions — point at discovery tools.

The *_base.md suffix means progressive disclosure and nothing else — a description with no manual of its own must not carry it. Grandfathered: get_exceptions uses an Instructions-suffixed var as its plain description. Prefer a single description file for new tools unless progressive disclosure is required.

Read the full file on GitHub · 62 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. 5d ago First seen · 62 lines · 1,203 tokens per session scan A 09cb199b24fe

Subscribe to this mod's changes

last9-mcp-server AGENTS.md is an instructions file published in the GitHub repository last9/last9-mcp-server (60 stars, last pushed today), licensed Apache-2.0. It adds 1,203 tokens to every session, about $0.0060 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.