fred-capability-mcp 4.4.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ # Copyright Thales 2026
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ """Installed MCP catalog provider, built entirely on fred-sdk."""
4
+
5
+ from fred_sdk.contracts.services import ServiceEndpointsPort
6
+ from fred_sdk.resources.mcp import McpCatalog, load_packaged_mcp_catalog
7
+
8
+
9
+ def load_catalog(services: ServiceEndpointsPort) -> McpCatalog:
10
+ """Load the MCP servers provided by Fred."""
11
+ return load_packaged_mcp_catalog(
12
+ package=__name__, path_parts=("mcp_catalog.yaml",), services=services
13
+ )
@@ -0,0 +1,37 @@
1
+ version: v1
2
+
3
+ # MCPs provided by Fred / Knowledge Flow.
4
+ servers:
5
+ - id: "mcp-knowledge-flow-mcp-tabular"
6
+ name: "mcp.servers.tabular.name"
7
+ description: "mcp.servers.tabular.description"
8
+ prompt_group_title: "tabular action"
9
+ transport: "streamable_http"
10
+ service: knowledge_flow
11
+ path: mcp-tabular
12
+ sse_read_timeout: 2000
13
+ enabled: true
14
+ auth_mode: "delegated"
15
+ prompt_file: pkg://fred_capability_mcp/prompts/tabular.md
16
+
17
+ - id: "mcp-knowledge-flow-opensearch-ops"
18
+ name: "mcp.servers.search_opensearch.name"
19
+ description: "mcp.servers.search_opensearch.description"
20
+ prompt_group_title: "OpenSearch operations"
21
+ transport: "streamable_http"
22
+ service: knowledge_flow
23
+ path: mcp-opensearch-ops
24
+ sse_read_timeout: 2000
25
+ enabled: true
26
+ auth_mode: "delegated"
27
+
28
+ - id: "mcp-knowledge-flow-prometheus-ops"
29
+ name: "mcp.servers.prometheus.name"
30
+ description: "mcp.servers.prometheus.description"
31
+ prompt_group_title: "Prometheus operations"
32
+ transport: "streamable_http"
33
+ service: knowledge_flow
34
+ path: mcp-prometheus-ops
35
+ sse_read_timeout: 2000
36
+ enabled: true
37
+ auth_mode: "delegated"
@@ -0,0 +1,82 @@
1
+ ## Tabular data access (read-only SQL over ingested spreadsheets)
2
+
3
+ These tools give read-only SQL access to ingested tabular documents: CSV
4
+ files (one table each) and Excel workbooks (one or several extracted
5
+ tables), stored as Parquet and queried through DuckDB.
6
+
7
+ Follow this order before answering a data question — do not guess table or
8
+ column names. Use only the tools you need for the user's request, but
9
+ NEVER skip `describe_tabular_documents` before `read_query`.
10
+
11
+ 1. `list_tabular_documents` — returns each accessible CSV or Excel document's
12
+ name and `document_uid`. Excel entries also list their tables with
13
+ sheet/title when available and the exact SQL `query_alias`. CSV entries
14
+ have no table list; use their `document_uid` for schema inspection.
15
+ An alias shown here is for locating a table, not for querying it yet.
16
+ 2. `describe_tabular_documents` — pass one or several document UIDs. For
17
+ Excel, read each document's `markdown` catalog first to identify the
18
+ relevant sheet and table: it includes titles, context, data ranges,
19
+ exact SQL aliases and residual text. Then inspect the selected table's
20
+ structured `columns` to confirm exact names and types. CSV documents
21
+ have no markdown catalog; use their typed table description directly.
22
+ Before `read_query`, you MUST call this tool with all document UIDs to
23
+ be queried (one call can include several UIDs) and obtain each SQL
24
+ table name from its `tables[].query_alias`, even if
25
+ `list_tabular_documents` already showed an alias.
26
+ 3. `read_query` — run ONE read-only SELECT over the mounted tables. In
27
+ the SQL, refer to EVERY table in `FROM` or `JOIN` by its exact
28
+ `tables[].query_alias` from step 2; do not use a
29
+ `document_uid`, filename, sheet name or table title as the SQL table
30
+ name. Joins across several tables are supported, including tables from
31
+ different documents, as long as each document is mounted via
32
+ `dataset_uids`.
33
+ 4. `search_tabular_values` — a LAST-RESORT locator for when a workbook (or
34
+ corpus) has many tables and you cannot tell from the catalog which one
35
+ holds a specific value the user named (a reference code, a name, an
36
+ amount). For Excel workbooks, use it only AFTER step 2: never call it
37
+ before reading the markdown catalog, and never to discover what a
38
+ workbook contains — step 2 already does that. Give it ONE precise
39
+ keyword (matching ignores case, accents and spaces and covers numeric
40
+ columns); it returns the table(s) and column(s) holding that value plus
41
+ a few matching rows, so you can then run one targeted `read_query`
42
+ (step 3). Use it sparingly — a generic term matches too many tables and
43
+ cannot disambiguate; if the response sets `tables_truncated` or a
44
+ table's `row_truncated`, the result is partial, so refine the keyword or
45
+ go back to the catalog.
46
+
47
+ Always scope `read_query` with `dataset_uids` (document uids — one
48
+ spreadsheet uid mounts every table of the workbook). `dataset_uids`
49
+ selects documents to mount; `query_alias` identifies each table in SQL.
50
+
51
+ The `query_alias` returned by `describe_tabular_documents` is an internal
52
+ technical identifier, used ONLY to build your queries. NEVER expose a
53
+ `query_alias` to the user or mention it in your answer. When you refer to
54
+ a table or sheet, use its human-readable name — the sheet or table title —
55
+ not its `query_alias`.
56
+
57
+ For Excel workbooks only: the markdown catalog from
58
+ `describe_tabular_documents` lists every sheet, table, data range and
59
+ identified column of the workbook. When — and only when — that catalog
60
+ makes clear beyond any doubt that the workbook holds nothing about what the
61
+ user asks (no column, table or context relates to the concept), answer that
62
+ the information is absent and do NOT run `read_query`. If any doubt remains,
63
+ query instead of guessing. This shortcut requires having read the markdown
64
+ first and applies to Excel only — plain CSV documents have no markdown
65
+ catalog, so confirm their columns in the typed table description.
66
+
67
+ When you do query, only use `LIKE`/`ILIKE` on text columns. Never apply
68
+ `LIKE` to a numeric column — DuckDB rejects it with a binder error and the
69
+ query fails. Filter numeric columns with `=`, `<`, `>` or ranges, and
70
+ confirm each column's type before writing the WHERE clause — the
71
+ structured `columns` in `describe_tabular_documents` report these types.
72
+ For string columns with `is_categorical=true`, `sample_values` lists every
73
+ distinct non-null value found. Use the exact stored spelling in filters;
74
+ `has_two_values=true` reports two distinct strings, not a boolean type or
75
+ true/false semantics. Only `dtype=boolean` confirms a typed boolean column.
76
+ For `dtype=integer` and `dtype=float`, `min_value` and `max_value` give
77
+ the finite observed bounds when available. Use them to understand the
78
+ data range before choosing numeric filters; they are descriptive, not
79
+ a substitute for `read_query` when the user needs actual rows or counts.
80
+
81
+ Only read-only SELECT queries are available. Never attempt INSERT, UPDATE,
82
+ DELETE, DROP, ALTER, or TRUNCATE — no write operations exist on these tables.
@@ -0,0 +1,69 @@
1
+ Metadata-Version: 2.4
2
+ Name: fred-capability-mcp
3
+ Version: 4.4.3
4
+ Summary: Catalog and packaged agent instructions for Fred's existing MCP capabilities.
5
+ Author-email: Thales <noreply@thalesgroup.com>
6
+ License: Apache-2.0
7
+ Requires-Python: <3.13,>=3.12
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: fred-sdk[agents]>=4.4.3
10
+ Provides-Extra: dev
11
+
12
+ # MCP capability catalog and instructions
13
+
14
+ Installing this package supplies Fred's internal MCP servers at pod startup through
15
+ its `fred.mcp_catalogs` entry point (`fred_capability_mcp:load_catalog`). The loader
16
+ uses `fred_sdk.resources.mcp`; capability construction, composer controls and
17
+ prompt groups live in `fred_sdk.contracts.capability.mcp`. The package has no
18
+ `fred-runtime` dependency.
19
+
20
+ The runtime resolves one catalog for transport and capability registration.
21
+ `FRED_MCP_CATALOG_FILE` or an existing `./config/mcp_catalog.yaml` replaces all
22
+ packaged servers. Otherwise it combines installed providers with the optional
23
+ `FRED_MCP_EXTERNAL_CATALOG_FILE` or `./config/mcp_catalog_external.yaml` file.
24
+ Duplicate server IDs fail startup.
25
+
26
+ The wheel includes one `mcp_catalog.yaml` with the three MCPs provided by
27
+ Fred / Knowledge Flow. Third-party MCP servers are not defined by this package.
28
+
29
+ Internal HTTP MCPs declare their backend and a path relative to its API:
30
+
31
+ ```yaml
32
+ service: knowledge_flow
33
+ path: mcp-tabular
34
+ ```
35
+
36
+ `fred_sdk.contracts.services` defines `FredService` and `ServiceEndpointsPort`.
37
+ At boot, the runtime passes `ConfiguredServiceEndpoints` to each catalog loader.
38
+ Its `get_base_url(service)` reads `ai.knowledge_flow_url` or
39
+ `platform.control_plane_url`, preserving the configured scheme, host, port and API
40
+ prefix. For example, `https://kf.example:9443/custom/v2/` produces
41
+ `https://kf.example:9443/custom/v2/mcp-tabular`. No address is stored in the
42
+ package catalog. Local document search is supplied by the native `document_access`
43
+ capability; the MCP catalog no longer advertises that tool or the unimplemented
44
+ GitHub adapter. Local tools use capabilities rather than an MCP transport.
45
+
46
+ External catalogs may use the same references by passing `services` to the SDK
47
+ loader, or retain a concrete `url`. Do not combine `service` with `url`.
48
+ Unknown services, missing addresses and invalid HTTP paths fail catalog loading.
49
+ SDK-only callers supply their own implementation of the port; no runtime import
50
+ or network discovery is required.
51
+
52
+ The wheel also includes `prompts/tabular.md`, the default pod's tabular instructions.
53
+
54
+ Deployment-owned catalogs can reference these instructions using:
55
+
56
+ ```yaml
57
+ prompt_file: pkg://fred_capability_mcp/prompts/tabular.md
58
+ ```
59
+
60
+ Inline `agent_instructions` remains supported. File references also accept
61
+ absolute paths or paths relative to the catalog. A packaged catalog resolves
62
+ relative paths within the package, including when imported from a wheel.
63
+ Declare only one instruction source; unreadable resources fail startup.
64
+
65
+ `fred-agents` installs this package locally and in its image; no copied catalog
66
+ or checkout symlink is needed. The Fred chart mounts an additional external
67
+ catalog while the installed package supplies its internal servers. Other pods
68
+ can provide their own MCP catalogs through the SDK/runtime interfaces. No extra
69
+ selectable wrapper capability is introduced: enabled servers retain their IDs.
@@ -0,0 +1,8 @@
1
+ fred_capability_mcp/__init__.py,sha256=zFFYQByF__j9SIjGLhFLNoS_Wa_zEGL9YVl2v3coV8w,500
2
+ fred_capability_mcp/mcp_catalog.yaml,sha256=k4bU84ix3yl1PnqynqnYUuSXCSdl8nojbpJj23fZjrU,1163
3
+ fred_capability_mcp/prompts/tabular.md,sha256=YhK0A3Lr9lfLGkm-ZIewmO3qNF59fk_uUim-BRCi6CI,5125
4
+ fred_capability_mcp-4.4.3.dist-info/METADATA,sha256=oxzSnaQ2-VIT8vIpgOkSDIGhZL97zppw_GkCnByGDe8,3328
5
+ fred_capability_mcp-4.4.3.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
6
+ fred_capability_mcp-4.4.3.dist-info/entry_points.txt,sha256=GUYuUSziAJUxdcmVWbDClwuF8d7EbClqJ5aXIR8zi9E,59
7
+ fred_capability_mcp-4.4.3.dist-info/top_level.txt,sha256=Sr4l6JSaAUOFn6vvumiWPtBMGslXHOF_CRTCtQf_vDU,20
8
+ fred_capability_mcp-4.4.3.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [fred.mcp_catalogs]
2
+ mcp = fred_capability_mcp:load_catalog
@@ -0,0 +1 @@
1
+ fred_capability_mcp