Catalog PyPI
PACKAGE EXPLORERView in registry

agenticlint

PyPI

Static linter that checks whether an OpenAPI spec is safe and clear enough to expose as MCP/AI-agent tools.

ai-agentlintermcpopenapistatic-analysis
Versions collected1
Direct dependencies3From release 0.1.0
Last observed20 Oct, 22:17 UTC

README

Version 0.1.0 documentation

agenticlint

English | 한국어

An OpenAPI spec being machine-readable does not make it agent-ready.

agenticlint is a static linter that checks whether an OpenAPI/Swagger document is safe and clear enough to expose as MCP / AI-agent tools — before you convert it. It flags ambiguous names, unclassified risk, missing approval policy, data-exfiltration surfaces, and tool-poisoning vectors. No LLM in the judgment path: every finding is deterministic and reproducible, so it works as a CI gate.

Docs: English guide · 한국어 가이드 · Rule reference

Install

pip install "agenticlint[cli]"   # library + full CLI
pip install agenticlint          # library only (a minimal built-in CLI still works)
pipx run agenticlint scan openapi.yaml

Not yet published to PyPI; until then install from source: pip install -e ".[cli]".

Use

CLI

agenticlint scan openapi.yaml
agenticlint scan https://api.example.com/openapi.json
agenticlint scan openapi.yaml --fail-on high --format markdown --output report.md

agenticlint baseline openapi.yaml                          # freeze the legacy backlog
agenticlint scan openapi.yaml --baseline .agenticlint-baseline.json   # only NEW findings fail

Exit codes: 0 pass · 1 findings at/above --fail-on · 2 load/config error. Behavior is configurable via ./.agenticlint.yaml (presets, rule on/off, thresholds, lexicon extension, ignorePaths) — see the guide.

Library (the core is the product; the CLI is a thin wrapper)

from agenticlint import scan

report = scan("openapi.yaml")     # path, http(s) URL, or a parsed dict
print(report.summary())
if not report.passed("high"):
    raise SystemExit(1)

report.to_json()      # versioned JSON contract — the cross-language interface
report.to_markdown()

GitHub Actions

- run: pipx run agenticlint scan openapi.yaml --fail-on high

What it checks (49 rules across 7 families)

FamilyConcernExamples
S structurefields missing → can't interpret/constructS007 risky op with no auth
A ambiguityvague names/descriptions → wrong tool/payloadA001 generic id param
X cross-opduplicate / conflicting tools across the specX001 near-identical descriptions
R riskHTTP-semantics contradictions, dangerous surfacesR001 side-effect GET · R003 collection-wide delete
P policydeclared x-agent-policy vs observed riskP001 destructive with no policy
I integritytool poisoning in descriptionsI001 prompt injection · I002 hidden chars
M MCP compatconversion loss / degradationM001 invalid tool name · M003 too many tools

Full judgment logic and the lexicons live in the rule reference; the reasoning for why static analysis can do this is in the "How it works" section of the guide.

How it works

OpenAPI (YAML/JSON) → parse ($ref) → IR (tokenized) → risk classifier
                    → rule engine (pure functions) → report + exit code

The risk classifier is a weighted signal table (HTTP method baseline + lexical override), not a model. Ambiguity is measured by proxy signals (short descriptions, generic names, near-duplicate descriptions) — the same principle ESLint uses for "bad code". See the guide for what static analysis covers vs. what stays with a human reviewer, and its Evidence & prior art section for the research (Hermes, AutoMCP, MetaTool, Anthropic/OpenAI tool guidance) grounding the rules.

x-agent-policy

Findings suggest an OpenAPI vendor extension you attach per operation:

x-agent-policy:
  risk: destructive          # read | write | destructive | financial | external | privilege
  requireConfirmation: true
  confirmationMessage: "Cancel order {orderId}? This cannot be undone."
  sensitiveData: false
  exposeToAgent: true

These map cleanly onto MCP tool annotations (readOnlyHint, destructiveHint, …), so the same policy drives the eventual MCP conversion.

Development

pip install -e ".[dev]"
pytest

The demo/ specs are the test oracle: shop-api-bad.yaml must reproduce expected-findings.yaml exactly, and shop-api-good.yaml must produce zero findings (it embeds false-positive traps). See demo/README.md.

License

Apache-2.0

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.010 Jul 20263

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
seo-yul/agenticlint

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:17 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:2117abee721a68aeaa973df01291a6308452b12609156565b1d410834f0d7a2d