naftiko: 1.0.0-alpha2 info: label: Factset SPAR Engine API — Analytics description: 'Factset SPAR Engine API — Analytics. 15 operations. Lead operation: Factset Get SPAR account returns type details. Self-contained Naftiko capability covering one Factset business surface.' tags: - Factset - Analytics created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: FACTSET_API_KEY: FACTSET_API_KEY capability: consumes: - type: http namespace: spar-engine-analytics-2 baseUri: https://api.factset.com description: Factset SPAR Engine API — Analytics business capability. Self-contained, no shared references. resources: - name: analytics-engines-spar-v3-accounts-accountPath-returns-type path: /analytics/engines/spar/v3/accounts/{accountPath}/returns-type operations: - name: getsparreturnstype method: GET description: Factset Get SPAR account returns type details outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: accountPath in: path type: string description: URL encoded account path required: true - name: analytics-engines-spar-v3-benchmarks path: /analytics/engines/spar/v3/benchmarks operations: - name: getsparbenchmarkbyid method: GET description: Factset Get SPAR benchmark details outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: query type: string description: Benchmark Identifier required: true - name: analytics-engines-spar-v3-calculations path: /analytics/engines/spar/v3/calculations operations: - name: postandcalculate method: POST description: Factset Create and Run SPAR calculation outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: X-FactSet-Api-Long-Running-Deadline in: header type: integer description: Long running deadline in seconds when only one unit is passed in the POST body. - name: Cache-Control in: header type: string description: Standard HTTP header. Accepts max-stale. - name: body in: body type: object description: Request body (JSON). required: false - name: getallcalculations method: GET description: Factset Get all calculations outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: pageNumber in: query type: integer - name: analytics-engines-spar-v3-calculations-id path: /analytics/engines/spar/v3/calculations/{id} operations: - name: putandcalculate method: PUT description: Factset Create or Update SPAR calculation and run it. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: from url, provided from the location header in the Create and Run SPAR calculation endpoint required: true - name: X-FactSet-Api-Long-Running-Deadline in: header type: integer description: Long running deadline in seconds when only one unit is passed in the PUT body. - name: Cache-Control in: header type: string description: Standard HTTP header. Accepts max-stale. - name: body in: body type: object description: Request body (JSON). required: false - name: getcalculationparameters method: GET description: Factset Get SPAR calculation parameters by id outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: from url, provided from the location header in the Create and Run SPAR calculation endpoint required: true - name: cancelcalculationbyid method: DELETE description: Factset Cancel SPAR calculation outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: from url, provided from the location header in the Create and Run SPAR calculation endpoint required: true - name: analytics-engines-spar-v3-calculations-id-status path: /analytics/engines/spar/v3/calculations/{id}/status operations: - name: getcalculationstatusbyid method: GET description: Factset Get SPAR calculation status by id outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: from url, provided from the location header in the Create and Run SPAR calculation endpoint required: true - name: analytics-engines-spar-v3-calculations-id-units-unitId-result path: /analytics/engines/spar/v3/calculations/{id}/units/{unitId}/result operations: - name: getcalculationunitresultbyid method: GET description: Factset Get SPAR calculation result by id outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: from url, provided from the location header in the Get SPAR calculation status by id endpoint required: true - name: unitId in: path type: string description: from url, provided from the location header in the Get SPAR calculation status by id endpoint required: true - name: analytics-engines-spar-v3-components path: /analytics/engines/spar/v3/components operations: - name: getsparcomponents method: GET description: Factset Get SPAR components outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: document in: query type: string description: Document Name required: true - name: analytics-engines-spar-v3-components-id path: /analytics/engines/spar/v3/components/{id} operations: - name: getsparcomponentbyid method: GET description: Factset Get SPAR component by id outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: Unique identifier for a SPAR component required: true - name: analytics-engines-spar-v3-documents-path path: /analytics/engines/spar/v3/documents/{path} operations: - name: getspar3documents method: GET description: Factset Gets SPAR3 documents and sub-directories in a directory outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: path in: path type: string description: The directory to get the documents in required: true - name: analytics-engines-spar-v3-frequencies path: /analytics/engines/spar/v3/frequencies operations: - name: getsparfrequencies method: GET description: Factset Get SPAR frequencies outputRawFormat: json outputParameters: - name: result type: object value: $. - name: analytics-lookups-v3-accounts-path path: /analytics/lookups/v3/accounts/{path} operations: - name: getaccounts method: GET description: Factset Get accounts and sub-directories in a directory outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: path in: path type: string description: The directory to get the accounts and sub-directories. required: true - name: analytics-lookups-v3-currencies path: /analytics/lookups/v3/currencies operations: - name: getcurrencies method: GET description: Factset Get currencies outputRawFormat: json outputParameters: - name: result type: object value: $. authentication: type: bearer token: '{{env.FACTSET_API_KEY}}' exposes: - type: rest namespace: spar-engine-analytics-2-rest port: 8080 description: REST adapter for Factset SPAR Engine API — Analytics. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/analytics/engines/spar/v3/accounts/{accountpath}/returns-type name: analytics-engines-spar-v3-accounts-accountpath-returns-type description: REST surface for analytics-engines-spar-v3-accounts-accountPath-returns-type. operations: - method: GET name: getsparreturnstype description: Factset Get SPAR account returns type details call: spar-engine-analytics-2.getsparreturnstype with: accountPath: rest.accountPath outputParameters: - type: object mapping: $. - path: /v1/analytics/engines/spar/v3/benchmarks name: analytics-engines-spar-v3-benchmarks description: REST surface for analytics-engines-spar-v3-benchmarks. operations: - method: GET name: getsparbenchmarkbyid description: Factset Get SPAR benchmark details call: spar-engine-analytics-2.getsparbenchmarkbyid with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/analytics/engines/spar/v3/calculations name: analytics-engines-spar-v3-calculations description: REST surface for analytics-engines-spar-v3-calculations. operations: - method: POST name: postandcalculate description: Factset Create and Run SPAR calculation call: spar-engine-analytics-2.postandcalculate with: X-FactSet-Api-Long-Running-Deadline: rest.X-FactSet-Api-Long-Running-Deadline Cache-Control: rest.Cache-Control body: rest.body outputParameters: - type: object mapping: $. - method: GET name: getallcalculations description: Factset Get all calculations call: spar-engine-analytics-2.getallcalculations with: pageNumber: rest.pageNumber outputParameters: - type: object mapping: $. - path: /v1/analytics/engines/spar/v3/calculations/{id} name: analytics-engines-spar-v3-calculations-id description: REST surface for analytics-engines-spar-v3-calculations-id. operations: - method: PUT name: putandcalculate description: Factset Create or Update SPAR calculation and run it. call: spar-engine-analytics-2.putandcalculate with: id: rest.id X-FactSet-Api-Long-Running-Deadline: rest.X-FactSet-Api-Long-Running-Deadline Cache-Control: rest.Cache-Control body: rest.body outputParameters: - type: object mapping: $. - method: GET name: getcalculationparameters description: Factset Get SPAR calculation parameters by id call: spar-engine-analytics-2.getcalculationparameters with: id: rest.id outputParameters: - type: object mapping: $. - method: DELETE name: cancelcalculationbyid description: Factset Cancel SPAR calculation call: spar-engine-analytics-2.cancelcalculationbyid with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/analytics/engines/spar/v3/calculations/{id}/status name: analytics-engines-spar-v3-calculations-id-status description: REST surface for analytics-engines-spar-v3-calculations-id-status. operations: - method: GET name: getcalculationstatusbyid description: Factset Get SPAR calculation status by id call: spar-engine-analytics-2.getcalculationstatusbyid with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/analytics/engines/spar/v3/calculations/{id}/units/{unitid}/result name: analytics-engines-spar-v3-calculations-id-units-unitid-result description: REST surface for analytics-engines-spar-v3-calculations-id-units-unitId-result. operations: - method: GET name: getcalculationunitresultbyid description: Factset Get SPAR calculation result by id call: spar-engine-analytics-2.getcalculationunitresultbyid with: id: rest.id unitId: rest.unitId outputParameters: - type: object mapping: $. - path: /v1/analytics/engines/spar/v3/components name: analytics-engines-spar-v3-components description: REST surface for analytics-engines-spar-v3-components. operations: - method: GET name: getsparcomponents description: Factset Get SPAR components call: spar-engine-analytics-2.getsparcomponents with: document: rest.document outputParameters: - type: object mapping: $. - path: /v1/analytics/engines/spar/v3/components/{id} name: analytics-engines-spar-v3-components-id description: REST surface for analytics-engines-spar-v3-components-id. operations: - method: GET name: getsparcomponentbyid description: Factset Get SPAR component by id call: spar-engine-analytics-2.getsparcomponentbyid with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/analytics/engines/spar/v3/documents/{path} name: analytics-engines-spar-v3-documents-path description: REST surface for analytics-engines-spar-v3-documents-path. operations: - method: GET name: getspar3documents description: Factset Gets SPAR3 documents and sub-directories in a directory call: spar-engine-analytics-2.getspar3documents with: path: rest.path outputParameters: - type: object mapping: $. - path: /v1/analytics/engines/spar/v3/frequencies name: analytics-engines-spar-v3-frequencies description: REST surface for analytics-engines-spar-v3-frequencies. operations: - method: GET name: getsparfrequencies description: Factset Get SPAR frequencies call: spar-engine-analytics-2.getsparfrequencies outputParameters: - type: object mapping: $. - path: /v1/analytics/lookups/v3/accounts/{path} name: analytics-lookups-v3-accounts-path description: REST surface for analytics-lookups-v3-accounts-path. operations: - method: GET name: getaccounts description: Factset Get accounts and sub-directories in a directory call: spar-engine-analytics-2.getaccounts with: path: rest.path outputParameters: - type: object mapping: $. - path: /v1/analytics/lookups/v3/currencies name: analytics-lookups-v3-currencies description: REST surface for analytics-lookups-v3-currencies. operations: - method: GET name: getcurrencies description: Factset Get currencies call: spar-engine-analytics-2.getcurrencies outputParameters: - type: object mapping: $. - type: mcp namespace: spar-engine-analytics-2-mcp port: 9090 transport: http description: MCP adapter for Factset SPAR Engine API — Analytics. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: factset-get-spar-account-returns description: Factset Get SPAR account returns type details hints: readOnly: true destructive: false idempotent: true call: spar-engine-analytics-2.getsparreturnstype with: accountPath: tools.accountPath outputParameters: - type: object mapping: $. - name: factset-get-spar-benchmark-details description: Factset Get SPAR benchmark details hints: readOnly: true destructive: false idempotent: true call: spar-engine-analytics-2.getsparbenchmarkbyid with: id: tools.id outputParameters: - type: object mapping: $. - name: factset-create-and-run-spar description: Factset Create and Run SPAR calculation hints: readOnly: false destructive: false idempotent: false call: spar-engine-analytics-2.postandcalculate with: X-FactSet-Api-Long-Running-Deadline: tools.X-FactSet-Api-Long-Running-Deadline Cache-Control: tools.Cache-Control body: tools.body outputParameters: - type: object mapping: $. - name: factset-get-all-calculations description: Factset Get all calculations hints: readOnly: true destructive: false idempotent: true call: spar-engine-analytics-2.getallcalculations with: pageNumber: tools.pageNumber outputParameters: - type: object mapping: $. - name: factset-create-update-spar-calculation description: Factset Create or Update SPAR calculation and run it. hints: readOnly: false destructive: false idempotent: true call: spar-engine-analytics-2.putandcalculate with: id: tools.id X-FactSet-Api-Long-Running-Deadline: tools.X-FactSet-Api-Long-Running-Deadline Cache-Control: tools.Cache-Control body: tools.body outputParameters: - type: object mapping: $. - name: factset-get-spar-calculation-parameters description: Factset Get SPAR calculation parameters by id hints: readOnly: true destructive: false idempotent: true call: spar-engine-analytics-2.getcalculationparameters with: id: tools.id outputParameters: - type: object mapping: $. - name: factset-cancel-spar-calculation description: Factset Cancel SPAR calculation hints: readOnly: false destructive: true idempotent: true call: spar-engine-analytics-2.cancelcalculationbyid with: id: tools.id outputParameters: - type: object mapping: $. - name: factset-get-spar-calculation-status description: Factset Get SPAR calculation status by id hints: readOnly: true destructive: false idempotent: true call: spar-engine-analytics-2.getcalculationstatusbyid with: id: tools.id outputParameters: - type: object mapping: $. - name: factset-get-spar-calculation-result description: Factset Get SPAR calculation result by id hints: readOnly: true destructive: false idempotent: true call: spar-engine-analytics-2.getcalculationunitresultbyid with: id: tools.id unitId: tools.unitId outputParameters: - type: object mapping: $. - name: factset-get-spar-components description: Factset Get SPAR components hints: readOnly: true destructive: false idempotent: true call: spar-engine-analytics-2.getsparcomponents with: document: tools.document outputParameters: - type: object mapping: $. - name: factset-get-spar-component-id description: Factset Get SPAR component by id hints: readOnly: true destructive: false idempotent: true call: spar-engine-analytics-2.getsparcomponentbyid with: id: tools.id outputParameters: - type: object mapping: $. - name: factset-gets-spar3-documents-and description: Factset Gets SPAR3 documents and sub-directories in a directory hints: readOnly: true destructive: false idempotent: true call: spar-engine-analytics-2.getspar3documents with: path: tools.path outputParameters: - type: object mapping: $. - name: factset-get-spar-frequencies description: Factset Get SPAR frequencies hints: readOnly: true destructive: false idempotent: true call: spar-engine-analytics-2.getsparfrequencies outputParameters: - type: object mapping: $. - name: factset-get-accounts-and-sub description: Factset Get accounts and sub-directories in a directory hints: readOnly: true destructive: false idempotent: true call: spar-engine-analytics-2.getaccounts with: path: tools.path outputParameters: - type: object mapping: $. - name: factset-get-currencies description: Factset Get currencies hints: readOnly: true destructive: false idempotent: true call: spar-engine-analytics-2.getcurrencies outputParameters: - type: object mapping: $.