Menu

Declaration Spec

Full YAML specification for paso MCP server declarations.

This is the full technical specification for usepaso.yaml files. Version 1.0.

Root Level

A declaration has four top-level fields:

FieldTypeRequiredDescription
versionstringYesMust be "1.0"
serviceobjectYesService metadata
capabilitiesarrayYesList of agent-accessible actions
permissionsobjectNoPermission tier assignments
version: "1.0"

service:
  name: Sentry
  description: Error monitoring for software teams
  base_url: https://sentry.io/api/0
  auth:
    type: bearer

capabilities:
  - name: list_issues
    # ...

permissions:
  read:
    - list_issues

Service Object

FieldTypeRequiredDescription
namestringYesHuman-readable service name
descriptionstringYesWhat the service does (used by agents for discovery)
base_urlstringYesBase URL of the API (e.g., https://api.sentry.io)
versionstringNoAPI version
authobjectNoAuthentication configuration
service:
  name: Stripe
  description: Payment processing and billing infrastructure
  base_url: https://api.stripe.com/v1
  version: "v1"
  auth:
    type: bearer

Auth Object

FieldTypeRequiredDescription
typestringYesOne of: api_key, bearer, oauth2, none
headerstringNoHeader name for api_key/bearer (default: Authorization)
prefixstringNoToken prefix (e.g., Bearer, Token)

The auth token is always provided at runtime via the USEPASO_AUTH_TOKEN environment variable.

Bearer

auth:
  type: bearer

Sends: Authorization: Bearer <USEPASO_AUTH_TOKEN>

API Key with Custom Header

auth:
  type: api_key
  header: X-API-Key

Sends: X-API-Key: <USEPASO_AUTH_TOKEN>

API Key with Custom Prefix

auth:
  type: api_key
  prefix: Token

Sends: Authorization: Token <USEPASO_AUTH_TOKEN>

No Auth

auth:
  type: none

No authentication header is sent. If USEPASO_AUTH_TOKEN is set, it is ignored.


Capability Object

Each item in capabilities represents one action an agent can take.

FieldTypeRequiredDescription
namestringYesMachine-readable identifier (snake_case, ^[a-z][a-z0-9_]*$)
descriptionstringYesWhat this action does
methodstringYesGET, POST, PUT, PATCH, DELETE
pathstringYesAPI path starting with /, may include {parameters}
permissionstringYesread, write, or admin
consent_requiredbooleanNoAgent must confirm with user before executing. Default: false
inputsobjectNoParameters the agent sends
outputobjectNoWhat the API returns
constraintsarrayNoBusiness rules and limits
- name: list_issues
  description: List issues in a project, filtered by status
  method: GET
  path: /projects/{organization_slug}/{project_slug}/issues/
  permission: read
  inputs:
    organization_slug:
      type: string
      required: true
      description: The organization slug
      in: path
  output:
    issues:
      type: array
      description: List of issue objects

Inputs Object

Keys are parameter names. Values describe the parameter.

FieldTypeRequiredDescription
typestringYesstring, integer, number, boolean, enum, array, object
requiredbooleanNoDefault: false
descriptionstringYesWhat this parameter does
valuesarrayFor enumAllowed values (required when type is enum)
defaultanyNoDefault value
instringNoquery, path, body, header. Default: body for POST/PUT/PATCH, query for GET/DELETE

String Parameter

inputs:
  query:
    type: string
    description: "Search query (e.g., 'is:unresolved')"
    in: query

Path Parameter

inputs:
  issue_id:
    type: string
    required: true
    description: The issue ID
    in: path

Path parameters referenced in path (e.g., {issue_id}) must exist in inputs with in: path.

Enum Parameter

inputs:
  status:
    type: enum
    required: true
    values: [resolved, unresolved, ignored]
    description: New status for the issue

Parameter with Default

inputs:
  limit:
    type: integer
    description: Number of results (1-100)
    default: 10
    in: query

Boolean Parameter

inputs:
  include_archived:
    type: boolean
    description: Include archived items in results
    default: false
    in: query

Output Object

Keys are field names. Values describe the response field.

FieldTypeRequiredDescription
typestringYesstring, integer, number, boolean, object, array
descriptionstringNoWhat this field contains
output:
  id:
    type: string
  email:
    type: string
  name:
    type: string
  balance:
    type: integer
    description: Current balance in cents

Constraints Array

Each constraint is an object with one or more rules.

FieldTypeDescription
max_per_hourintegerRate limit per hour
max_per_requestintegerMax items per request (bulk operations)
max_valuenumberMax numeric value
allowed_valuesarrayRestrict an input to specific values
requires_fieldstringAnother input that must be present
descriptionstringHuman-readable rule explanation
constraints:
  - max_per_hour: 500
    description: Payment creation is rate-limited
  - max_value: 99999999
    description: Maximum single charge is $999,999.99
  - requires_field: currency
    description: Currency is required when specifying an amount

Permissions Object

Groups capabilities into permission tiers.

FieldTypeDescription
readarray of stringsCapability names agents can call with read-only access
writearray of stringsCapability names requiring write access
adminarray of stringsCapability names requiring admin access
forbiddenarray of stringsCapability names agents may never call
permissions:
  read:
    - list_customers
    - get_customer
    - list_invoices
  write:
    - create_customer
    - create_payment_intent
  admin:
    - refund_payment
  forbidden:
    - delete_customer

If permissions is omitted, each capability’s permission field is used directly.

Validation Rules for Permissions

  • Every capability name in read, write, or admin must exist in capabilities
  • The forbidden tier may reference capability names not declared (to explicitly block endpoints)
  • A capability cannot appear in both a permission tier and forbidden

Validation Rules

  1. version must be "1.0"
  2. service.name must be non-empty
  3. service.description must be non-empty
  4. service.base_url must be a valid URL
  5. Each capability name must be unique
  6. Each capability name must be snake_case (^[a-z][a-z0-9_]*$)
  7. method must be GET, POST, PUT, PATCH, or DELETE
  8. path must start with /
  9. Parameters in path (e.g., {project_id}) must exist in inputs with in: path
  10. enum type inputs must have values defined
  11. Permission tier references must match declared capability names
  12. A capability cannot appear in both a tier and forbidden

Run usepaso validate to check all rules. Use usepaso validate --strict for best-practice warnings.


JSON Schema

For editor autocomplete, point your YAML language server at the JSON Schema:

# yaml-language-server: $schema=https://raw.githubusercontent.com/5h1vmani/usepaso/main/spec/usepaso.schema.json
version: "1.0"

The schema is the machine-readable source of truth: spec/usepaso.schema.json

The human-readable spec: spec/usepaso-spec.md