senado-br-mcp 3.12.1 → 3.13.0
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.
- package/README.md +1 -1
- package/dist/server.js +18 -4
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -752,7 +752,7 @@ Reads a bundled snapshot of the Senate's organizational tree (crawled from the i
|
|
|
752
752
|
|
|
753
753
|
### Group U — Deep Research (2 tools)
|
|
754
754
|
|
|
755
|
-
The [OpenAI Deep Research contract](#chatgpt-deep-research): the only two tools without the `senado_` prefix, because the names are fixed by the contract. Registered through the same shim as the others (read-only annotations,
|
|
755
|
+
The [OpenAI Deep Research contract](#chatgpt-deep-research): the only two tools without the `senado_` prefix, because the names are fixed by the contract. Registered through the same shim as the others (read-only annotations, the shared output envelope — open data plus required `provenance` + `attribution` —, per-tool telemetry) and served on `/mcp` only — the curated ChatGPT app profile does not include them. The index (senators in office + active committees, ~300 documents) is built on first use from the same two list endpoints the `senado_listar_*` tools read, and kept for 24 h.
|
|
756
756
|
|
|
757
757
|
| Tool | Description |
|
|
758
758
|
|------|-------------|
|
package/dist/server.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
6
6
|
import { z } from "zod";
|
|
7
|
+
import { ConciseBlockSchema } from "@sbissoli/mcp-provenance";
|
|
7
8
|
import { registerReferenciaTools } from "./tools/referencia.js";
|
|
8
9
|
import { registerSenadoresTools } from "./tools/senadores.js";
|
|
9
10
|
import { registerMateriasTools } from "./tools/materias.js";
|
|
@@ -83,10 +84,23 @@ export function createServer(env, ctx, options = {}) {
|
|
|
83
84
|
// reaches external systems (Senate APIs / e-Cidadania) whose data is an open, changing
|
|
84
85
|
// set; and every tool returns a JSON object via toolResult(). Rather than repeat that
|
|
85
86
|
// metadata at every call site, wrap the group modules' `server.tool(name, desc, shape, cb)`
|
|
86
|
-
// calls and route them through registerTool() with shared annotations and
|
|
87
|
-
//
|
|
88
|
-
// is
|
|
89
|
-
|
|
87
|
+
// calls and route them through registerTool() with shared annotations and ONE shared
|
|
88
|
+
// outputSchema. The callback is also wrapped with instrumentTool() so every invocation
|
|
89
|
+
// is counted per tool.
|
|
90
|
+
//
|
|
91
|
+
// O schema de saída é o ENVELOPE COMUM (decisão do dono, 04/10/2026): aberto — a forma
|
|
92
|
+
// dos dados de cada tool segue sem contrato, como decidido em
|
|
93
|
+
// docs/_local/_checklist-melhorias-arquiteturais.pt-BR.md ("passthrough foi decisão
|
|
94
|
+
// deliberada") —, mas com o que TODA resposta de sucesso das 69 carrega obrigatório:
|
|
95
|
+
// `provenance` + `attribution`, que `resultWithProvenance`/`provenanceExtras` sempre
|
|
96
|
+
// montam. O bloco é o schema IMPORTADO do @sbissoli/mcp-provenance, nunca transcrito:
|
|
97
|
+
// a cópia à mão de um bloco selado derrubou quatro irmãos quando o contrato ganhou
|
|
98
|
+
// `retrieval`. `provenance` é objeto com uma fonte e LISTA quando a chamada passa
|
|
99
|
+
// várias (o índice do Deep Research), então os dois.
|
|
100
|
+
const outputSchema = z.looseObject({
|
|
101
|
+
provenance: z.union([ConciseBlockSchema, z.array(ConciseBlockSchema).min(1)]),
|
|
102
|
+
attribution: z.array(z.string()),
|
|
103
|
+
});
|
|
90
104
|
const registerTool = server.registerTool.bind(server);
|
|
91
105
|
const analytics = env.SENADO_ANALYTICS;
|
|
92
106
|
// O shim é instalado sobre a instância e o resultado é NOMEADO: os módulos de
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "senado-br-mcp",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"description": "MCP server for Brazilian Senate open data — runs hosted on Cloudflare Workers or locally via npx (stdio)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@modelcontextprotocol/client": "^2.0.0",
|
|
63
63
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
64
64
|
"@sbissoli/mcp-evals": "^0.1.0",
|
|
65
|
-
"@sbissoli/mcp-surface": "^0.
|
|
65
|
+
"@sbissoli/mcp-surface": "^0.2.0",
|
|
66
66
|
"@types/node": "^26.5.1",
|
|
67
67
|
"agents": "^0.24.0",
|
|
68
68
|
"exceljs": "^4.4.0",
|