naftiko: 1.0.0-alpha2 info: label: NESO Data Portal API — Datastore description: 'NESO Data Portal API — Datastore. 2 operations. Lead operation: Query tabular data. Self-contained Naftiko capability covering one National Energy System Operator business surface.' tags: - National Energy System Operator - Datastore created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: NATIONAL_ENERGY_SYSTEM_OPERATOR_API_KEY: NATIONAL_ENERGY_SYSTEM_OPERATOR_API_KEY capability: consumes: - type: http namespace: national-energy-system-operator-datastore baseUri: https://api.neso.energy/api/3/action description: NESO Data Portal API — Datastore business capability. Self-contained, no shared references. resources: - name: datastore_search path: /datastore_search operations: - name: datastoresearch method: GET description: Query tabular data outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: resource_id in: query type: string description: Resource identifier whose datastore is being queried. required: true - name: limit in: query type: integer description: Maximum number of records to return. - name: offset in: query type: integer description: Offset into the result set. - name: q in: query type: string description: Free-text query against indexed fields. - name: datastore_search_sql path: /datastore_search_sql operations: - name: datastoresearchsql method: GET description: Query datastore via SQL outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: sql in: query type: string description: PostgreSQL-syntax SQL query. required: true exposes: - type: rest namespace: national-energy-system-operator-datastore-rest port: 8080 description: REST adapter for NESO Data Portal API — Datastore. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/datastore-search name: datastore-search description: REST surface for datastore_search. operations: - method: GET name: datastoresearch description: Query tabular data call: national-energy-system-operator-datastore.datastoresearch with: resource_id: rest.resource_id limit: rest.limit offset: rest.offset q: rest.q outputParameters: - type: object mapping: $. - path: /v1/datastore-search-sql name: datastore-search-sql description: REST surface for datastore_search_sql. operations: - method: GET name: datastoresearchsql description: Query datastore via SQL call: national-energy-system-operator-datastore.datastoresearchsql with: sql: rest.sql outputParameters: - type: object mapping: $. - type: mcp namespace: national-energy-system-operator-datastore-mcp port: 9090 transport: http description: MCP adapter for NESO Data Portal API — Datastore. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: query-tabular-data description: Query tabular data hints: readOnly: true destructive: false idempotent: true call: national-energy-system-operator-datastore.datastoresearch with: resource_id: tools.resource_id limit: tools.limit offset: tools.offset q: tools.q outputParameters: - type: object mapping: $. - name: query-datastore-sql description: Query datastore via SQL hints: readOnly: true destructive: false idempotent: true call: national-energy-system-operator-datastore.datastoresearchsql with: sql: tools.sql outputParameters: - type: object mapping: $.