PortfolioFit
Check normalized portfolios against mandates and calculate allocation constraints.
¿Debería usar esto?
Calidad y seguridad
Hallazgos (1)
- LOWen calculate_portfolio_constraints
Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.
Costo de contexto
Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.
Instalar
Instalación con un clic
Agrega esto a tu archivo `claude_desktop_config.json`:
{
"mcpServers": {
"portfoliofit": {
"url": "https://portfolio.fit/mcp"
}
}
}Puntos de conexión remotos
https://portfolio.fit/mcpstreamable-httpQué puede hacer
Inventario de herramientas
Herramientas (2)
🟡evaluate_portfolio_alignment(holdings, idempotency_key, mandate, rules, portfolio_name, ...)
Compare a clean mandate with normalized holdings. Do not send PDF, CSV, spreadsheet, or factsheet files; extract them before calling.
Esquema de entrada
{
"type": "object",
"properties": {
"holdings": {
"items": {
"$ref": "#/$defs/AlignmentHolding"
},
"maxItems": 1000,
"minItems": 1,
"title": "Holdings",
"type": "array"
},
"idempotency_key": {
"maxLength": 255,
"minLength": 1,
"title": "Idempotency Key",
"type": "string"
},
"mandate": {
"default": "",
"maxLength": 50000,
"title": "Mandate",
"type": "string"
},
"rules": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/AlignmentRule"
},
"maxItems": 250,
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Rules"
},
"portfolio_name": {
"default": "Portfolio",
"maxLength": 255,
"title": "Portfolio Name",
"type": "string"
},
"base_currency": {
"default": "USD",
"maxLength": 16,
"minLength": 1,
"title": "Base Currency",
"type": "string"
},
"composition_scope": {
"default": "unknown",
"enum": [
"complete",
"partial",
"unknown"
],
"title": "Composition Scope",
"type": "string"
},
"source_warnings": {
"anyOf": [
{
"items": {
"maxLength": 2000,
"minLength": 1,
"type": "string"
},
"maxItems": 100,
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Source Warnings"
}
},
"required": [
"holdings",
"idempotency_key"
],
"$defs": {
"AlignmentHolding": {
"additionalProperties": false,
"properties": {
"id": {
"maxLength": 120,
"minLength": 1,
"title": "Id",
"type": "string"
},
"name": {
"maxLength": 500,
"minLength": 1,
"title": "Name",
"type": "string"
},
"weight": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Portfolio weight. Prefer a decimal share such as 0.24 for 24%. Percentage-point inputs such as 24 are also accepted and normalized when the supplied holdings use that convention.",
"title": "Weight"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"currency": {
"default": "",
"maxLength": 16,
"title": "Currency",
"type": "string"
},
"attributes": {
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"maxProperties": 100,
"title": "Attributes",
"type": "object"
},
"source_reference": {
"default": "",
"maxLength": 500,
"title": "Source Reference",
"type": "string"
}
},
"required": [
"id",
"name"
],
"title": "AlignmentHolding",
"type": "object"
},
"AlignmentRule": {
"additionalProperties": false,
"properties": {
"id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"title": {
"default": "",
"maxLength": 200,
"title": "Title",
"type": "string"
},
"target": {
"maxLength": 500,
"minLength": 1,
"title": "Target",
"type": "string"
},
"operator": {
"enum": [
"<",
"<=",
"=",
"!=",
">=",
">",
"range"
],
"title": "Operator",
"type": "string"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Threshold"
},
"min_value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Min Value"
},
"max_value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Value"
},
"unit": {
"default": "percent",
"maxLength": 64,
"title": "Unit",
"type": "string"
},
"explanation": {
"default": "",
"maxLength": 2000,
"title": "Explanation",
"type": "string"
},
"enabled": {
"default": true,
"title": "Enabled",
"type": "boolean"
},
"exposure_filter": {
"anyOf": [
{
"$ref": "#/$defs/ExposureFilter"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"target",
"operator"
],
"title": "AlignmentRule",
"type": "object"
},
"ExposureFilter": {
"additionalProperties": false,
"properties": {
"dimension": {
"enum": [
"denomination_currency",
"country",
"domicile",
"issuer_country",
"listing_country",
"asset_class",
"rating",
"sector"
],
"title": "Dimension",
"type": "string"
},
"match": {
"enum": [
"equals",
"not_equals",
"in",
"not_in"
],
"title": "Match",
"type": "string"
},
"values": {
"items": {
"maxLength": 120,
"minLength": 1,
"type": "string"
},
"maxItems": 100,
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"dimension",
"match",
"values"
],
"title": "ExposureFilter",
"type": "object"
}
},
"title": "evaluate_portfolio_alignmentArguments"
}Esquema de salida
{
"type": "object",
"$defs": {
"CapabilityLimitExceededOutput": {
"additionalProperties": false,
"properties": {
"code": {
"const": "capability_limit_exceeded",
"title": "Code",
"type": "string"
},
"status": {
"const": "quota_exceeded",
"title": "Status",
"type": "string"
},
"message": {
"title": "Message",
"type": "string"
},
"capability": {
"title": "Capability",
"type": "string"
},
"plan": {
"title": "Plan",
"type": "string"
},
"usage": {
"$ref": "#/$defs/CapabilityLimitUsage"
},
"resolution_paths": {
"items": {
"$ref": "#/$defs/CapabilityLimitResolutionPath"
},
"minItems": 1,
"title": "Resolution Paths",
"type": "array"
},
"retryable_now": {
"const": false,
"default": false,
"title": "Retryable Now",
"type": "boolean"
},
"same_idempotency_key_reusable": {
"const": true,
"default": true,
"title": "Same Idempotency Key Reusable",
"type": "boolean"
}
},
"required": [
"code",
"status",
"message",
"capability",
"plan",
"usage",
"resolution_paths"
],
"title": "CapabilityLimitExceededOutput",
"type": "object"
},
"CapabilityLimitResolutionPath": {
"additionalProperties": false,
"properties": {
"id": {
"maxLength": 64,
"minLength": 1,
"title": "Id",
"type": "string"
},
"label": {
"maxLength": 120,
"minLength": 1,
"title": "Label",
"type": "string"
},
"description": {
"maxLength": 500,
"minLength": 1,
"title": "Description",
"type": "string"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
},
"available_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Available At"
}
},
"required": [
"id",
"label",
"description"
],
"title": "CapabilityLimitResolutionPath",
"type": "object"
},
"CapabilityLimitUsage": {
"additionalProperties": false,
"properties": {
"period": {
"const": "calendar_month",
"default": "calendar_month",
"title": "Period",
"type": "string"
},
"used": {
"minimum": 0,
"title": "Used",
"type": "integer"
},
"limit": {
"minimum": 0,
"title": "Limit",
"type": "integer"
},
"started_at": {
"format": "date-time",
"title": "Started At",
"type": "string"
},
"resets_at": {
"format": "date-time",
"title": "Resets At",
"type": "string"
}
},
"required": [
"used",
"limit",
"started_at",
"resets_at"
],
"title": "CapabilityLimitUsage",
"type": "object"
},
"InvocationMeta": {
"additionalProperties": false,
"properties": {
"idempotent_replay": {
"title": "Idempotent Replay",
"type": "boolean"
},
"plan": {
"title": "Plan",
"type": "string"
},
"monthly_invocations": {
"title": "Monthly Invocations",
"type": "integer"
},
"monthly_invocation_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Monthly Invocation Limit"
},
"monthly_tokens": {
"$ref": "#/$defs/MonthlyTokenUsage"
}
},
"required": [
"idempotent_replay",
"plan",
"monthly_invocations",
"monthly_invocation_limit",
"monthly_tokens"
],
"title": "InvocationMeta",
"type": "object"
},
"MonthlyTokenUsage": {
"additionalProperties": false,
"properties": {
"input_tokens": {
"default": 0,
"title": "Input Tokens",
"type": "integer"
},
"output_tokens": {
"default": 0,
"title": "Output Tokens",
"type": "integer"
},
"total_tokens": {
"default": 0,
"title": "Total Tokens",
"type": "integer"
}
},
"title": "MonthlyTokenUsage",
"type": "object"
},
"PortfolioAlignmentOutput": {
"additionalProperties": false,
"properties": {
"capability": {
"const": "portfolio_alignment.v1",
"title": "Capability",
"type": "string"
},
"status": {
"enum": [
"compliant",
"non_compliant",
"insufficient_evidence"
],
"title": "Status",
"type": "string"
},
"summary": {
"title": "Summary",
"type": "string"
},
"findings": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Findings",
"type": "array"
},
"rule_results": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Rule Results",
"type": "array"
},
"warnings": {
"items": {
"type": "string"
},
"title": "Warnings",
"type": "array"
},
"meta": {
"$ref": "#/$defs/InvocationMeta"
}
},
"required": [
"capability",
"status",
"summary",
"meta"
],
"title": "PortfolioAlignmentOutput",
"type": "object"
}
},
"anyOf": [
{
"$ref": "#/$defs/PortfolioAlignmentOutput"
},
{
"$ref": "#/$defs/CapabilityLimitExceededOutput"
}
],
"title": "PortfolioAlignmentToolOutput"
}🟢calculate_portfolio_constraints(holdings, constraints, idempotency_key, base_currency, composition_scope, ...)
Calculate explicit portfolio constraints deterministically from normalized holdings. Use this for arithmetic checks, not for interpreting natural-language mandates.
Esquema de entrada
{
"type": "object",
"properties": {
"holdings": {
"items": {
"$ref": "#/$defs/AlignmentHolding"
},
"maxItems": 1000,
"minItems": 1,
"title": "Holdings",
"type": "array"
},
"constraints": {
"items": {
"$ref": "#/$defs/DeterministicConstraint"
},
"maxItems": 250,
"minItems": 1,
"title": "Constraints",
"type": "array"
},
"idempotency_key": {
"maxLength": 255,
"minLength": 1,
"title": "Idempotency Key",
"type": "string"
},
"base_currency": {
"default": "USD",
"maxLength": 16,
"minLength": 1,
"title": "Base Currency",
"type": "string"
},
"composition_scope": {
"default": "unknown",
"enum": [
"complete",
"partial",
"unknown"
],
"title": "Composition Scope",
"type": "string"
},
"source_warnings": {
"anyOf": [
{
"items": {
"maxLength": 2000,
"minLength": 1,
"type": "string"
},
"maxItems": 100,
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Source Warnings"
}
},
"required": [
"holdings",
"constraints",
"idempotency_key"
],
"$defs": {
"AlignmentHolding": {
"additionalProperties": false,
"properties": {
"id": {
"maxLength": 120,
"minLength": 1,
"title": "Id",
"type": "string"
},
"name": {
"maxLength": 500,
"minLength": 1,
"title": "Name",
"type": "string"
},
"weight": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Portfolio weight. Prefer a decimal share such as 0.24 for 24%. Percentage-point inputs such as 24 are also accepted and normalized when the supplied holdings use that convention.",
"title": "Weight"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"currency": {
"default": "",
"maxLength": 16,
"title": "Currency",
"type": "string"
},
"attributes": {
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"maxProperties": 100,
"title": "Attributes",
"type": "object"
},
"source_reference": {
"default": "",
"maxLength": 500,
"title": "Source Reference",
"type": "string"
}
},
"required": [
"id",
"name"
],
"title": "AlignmentHolding",
"type": "object"
},
"DeterministicConstraint": {
"additionalProperties": false,
"properties": {
"id": {
"maxLength": 120,
"minLength": 1,
"title": "Id",
"type": "string"
},
"metric": {
"enum": [
"single_holding_weight",
"selected_holdings_weight",
"filtered_holdings_weight",
"top_n_holdings_weight",
"holding_count",
"total_weight"
],
"title": "Metric",
"type": "string"
},
"operator": {
"enum": [
"<",
"<=",
"=",
"!=",
">=",
">",
"range"
],
"title": "Operator",
"type": "string"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Threshold"
},
"min_value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Min Value"
},
"max_value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Value"
},
"holding_ids": {
"items": {
"type": "string"
},
"maxItems": 1000,
"title": "Holding Ids",
"type": "array"
},
"top_n": {
"anyOf": [
{
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Top N"
},
"exposure_filter": {
"anyOf": [
{
"$ref": "#/$defs/ExposureFilter"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"id",
"metric",
"operator"
],
"title": "DeterministicConstraint",
"type": "object"
},
"ExposureFilter": {
"additionalProperties": false,
"properties": {
"dimension": {
"enum": [
"denomination_currency",
"country",
"domicile",
"issuer_country",
"listing_country",
"asset_class",
"rating",
"sector"
],
"title": "Dimension",
"type": "string"
},
"match": {
"enum": [
"equals",
"not_equals",
"in",
"not_in"
],
"title": "Match",
"type": "string"
},
"values": {
"items": {
"maxLength": 120,
"minLength": 1,
"type": "string"
},
"maxItems": 100,
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"dimension",
"match",
"values"
],
"title": "ExposureFilter",
"type": "object"
}
},
"title": "calculate_portfolio_constraintsArguments"
}Esquema de salida
{
"type": "object",
"$defs": {
"CapabilityLimitExceededOutput": {
"additionalProperties": false,
"properties": {
"code": {
"const": "capability_limit_exceeded",
"title": "Code",
"type": "string"
},
"status": {
"const": "quota_exceeded",
"title": "Status",
"type": "string"
},
"message": {
"title": "Message",
"type": "string"
},
"capability": {
"title": "Capability",
"type": "string"
},
"plan": {
"title": "Plan",
"type": "string"
},
"usage": {
"$ref": "#/$defs/CapabilityLimitUsage"
},
"resolution_paths": {
"items": {
"$ref": "#/$defs/CapabilityLimitResolutionPath"
},
"minItems": 1,
"title": "Resolution Paths",
"type": "array"
},
"retryable_now": {
"const": false,
"default": false,
"title": "Retryable Now",
"type": "boolean"
},
"same_idempotency_key_reusable": {
"const": true,
"default": true,
"title": "Same Idempotency Key Reusable",
"type": "boolean"
}
},
"required": [
"code",
"status",
"message",
"capability",
"plan",
"usage",
"resolution_paths"
],
"title": "CapabilityLimitExceededOutput",
"type": "object"
},
"CapabilityLimitResolutionPath": {
"additionalProperties": false,
"properties": {
"id": {
"maxLength": 64,
"minLength": 1,
"title": "Id",
"type": "string"
},
"label": {
"maxLength": 120,
"minLength": 1,
"title": "Label",
"type": "string"
},
"description": {
"maxLength": 500,
"minLength": 1,
"title": "Description",
"type": "string"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
},
"available_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Available At"
}
},
"required": [
"id",
"label",
"description"
],
"title": "CapabilityLimitResolutionPath",
"type": "object"
},
"CapabilityLimitUsage": {
"additionalProperties": false,
"properties": {
"period": {
"const": "calendar_month",
"default": "calendar_month",
"title": "Period",
"type": "string"
},
"used": {
"minimum": 0,
"title": "Used",
"type": "integer"
},
"limit": {
"minimum": 0,
"title": "Limit",
"type": "integer"
},
"started_at": {
"format": "date-time",
"title": "Started At",
"type": "string"
},
"resets_at": {
"format": "date-time",
"title": "Resets At",
"type": "string"
}
},
"required": [
"used",
"limit",
"started_at",
"resets_at"
],
"title": "CapabilityLimitUsage",
"type": "object"
},
"ConstraintResult": {
"additionalProperties": false,
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"metric": {
"enum": [
"single_holding_weight",
"selected_holdings_weight",
"filtered_holdings_weight",
"top_n_holdings_weight",
"holding_count",
"total_weight"
],
"title": "Metric",
"type": "string"
},
"status": {
"enum": [
"pass",
"fail",
"insufficient_evidence"
],
"title": "Status",
"type": "string"
},
"actual": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Actual"
},
"holding_ids": {
"items": {
"type": "string"
},
"title": "Holding Ids",
"type": "array"
},
"message": {
"title": "Message",
"type": "string"
}
},
"required": [
"id",
"metric",
"status",
"message"
],
"title": "ConstraintResult",
"type": "object"
},
"InvocationMeta": {
"additionalProperties": false,
"properties": {
"idempotent_replay": {
"title": "Idempotent Replay",
"type": "boolean"
},
"plan": {
"title": "Plan",
"type": "string"
},
"monthly_invocations": {
"title": "Monthly Invocations",
"type": "integer"
},
"monthly_invocation_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Monthly Invocation Limit"
},
"monthly_tokens": {
"$ref": "#/$defs/MonthlyTokenUsage"
}
},
"required": [
"idempotent_replay",
"plan",
"monthly_invocations",
"monthly_invocation_limit",
"monthly_tokens"
],
"title": "InvocationMeta",
"type": "object"
},
"MonthlyTokenUsage": {
"additionalProperties": false,
"properties": {
"input_tokens": {
"default": 0,
"title": "Input Tokens",
"type": "integer"
},
"output_tokens": {
"default": 0,
"title": "Output Tokens",
"type": "integer"
},
"total_tokens": {
"default": 0,
"title": "Total Tokens",
"type": "integer"
}
},
"title": "MonthlyTokenUsage",
"type": "object"
},
"PortfolioConstraintsOutput": {
"additionalProperties": false,
"properties": {
"capability": {
"const": "portfolio_constraints.v1",
"title": "Capability",
"type": "string"
},
"status": {
"enum": [
"compliant",
"non_compliant",
"insufficient_evidence"
],
"title": "Status",
"type": "string"
},
"results": {
"items": {
"$ref": "#/$defs/ConstraintResult"
},
"title": "Results",
"type": "array"
},
"warnings": {
"items": {
"type": "string"
},
"title": "Warnings",
"type": "array"
},
"meta": {
"$ref": "#/$defs/InvocationMeta"
}
},
"required": [
"capability",
"status",
"meta"
],
"title": "PortfolioConstraintsOutput",
"type": "object"
}
},
"anyOf": [
{
"$ref": "#/$defs/PortfolioConstraintsOutput"
},
{
"$ref": "#/$defs/CapabilityLimitExceededOutput"
}
],
"title": "PortfolioConstraintsToolOutput"
}Comunidad
Evidencia