Documentation
¶
Overview ¶
Package policy is the curation layer (L4): it decides which operations are safe and appropriate to expose as MCP tools. This is api2mcp's core value — not converting an API, but exposing a deliberately small, safe slice of it.
The default posture is conservative: with ReadOnly enabled, only side-effect free operations survive, so an LLM cannot POST/PUT/DELETE against your API unless you explicitly opt in.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Matcher ¶
Matcher reports whether an operation matches some criterion.
func OperationID ¶
OperationID matches an operation by its exact id.
type Policy ¶
Policy is an ordered set of include/exclude matchers plus a read-only switch.
Filtering semantics, applied per operation:
- if ReadOnly is set and the op is not read-only, drop it;
- if any Include matchers exist, the op must match at least one, else drop;
- if the op matches any Exclude matcher, drop it.