Skip to content

Commit 6ec7f6c

Browse files
authored
Merge pull request #3 from Program-Integrity-Alliance/feat-fed-register-eos
- Synchronized schema validation rules from remote server - Added Executive Orders from fed register - Minor bug fixes
2 parents 9e11c24 + 95f7f9d commit 6ec7f6c

File tree

6 files changed

+462
-29
lines changed

6 files changed

+462
-29
lines changed

README.md

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,15 @@ Then add this to your Client, eg Claude ...
150150

151151
## 💡 Available Tools
152152

153-
The server provides 11 tools for searching the Program Integrity Alliance (PIA) database:
153+
The server provides 12 tools for searching the Program Integrity Alliance (PIA) database:
154154

155155
### Core Search Tools
156156

157157
### 1. `pia_search_content`
158158

159159
**Purpose:** Comprehensive search tool for querying document content and recommendations in the PIA database.
160160

161-
**Description:** Returns comprehensive results with full citation information and clickable links for proper attribution. Each result includes corresponding citations with data source attribution. Major data sources include: Department of Justice (198k+ docs), Congress.gov (29k+ docs), Oversight.gov (22k+ docs), CRS (22k+ docs), GAO (10k+ docs). Supports complex OData filtering with boolean logic, operators, and grouping.
161+
**Description:** Returns comprehensive results with full citation information and clickable links for proper attribution. Each result includes corresponding citations with data source attribution. Major data sources include: Department of Justice (198k+ docs), Congress.gov (29k+ docs), Oversight.gov (22k+ docs), CRS (22k+ docs), GAO (10k+ docs), Federal Register (1k+ executive orders). Use pia_search_content_executive_orders to search only executive orders. Supports complex OData filtering with boolean logic, operators, and grouping.
162162

163163
**Parameters:**
164164
- `query` (required): Search query text
@@ -173,7 +173,7 @@ The server provides 11 tools for searching the Program Integrity Alliance (PIA)
173173

174174
**Purpose:** Get available facets (filter values) for the PIA database content search.
175175

176-
**Description:** This can help understand what filter values are available before performing content searches. Major data sources include: Department of Justice (198k+ docs), Congress.gov (29k+ docs), Oversight.gov (22k+ docs), CRS (22k+ docs), GAO (10k+ docs).
176+
**Description:** This can help understand what filter values are available before performing content searches. Major data sources include: Department of Justice (198k+ docs), Congress.gov (29k+ docs), Oversight.gov (22k+ docs), CRS (22k+ docs), GAO (10k+ docs), Federal Register (1k+ executive orders). Use pia_search_content_executive_orders to search only executive orders.
177177

178178
**Parameters:**
179179
- `query` (optional): Optional query to get facets for (default: "")
@@ -183,7 +183,7 @@ The server provides 11 tools for searching the Program Integrity Alliance (PIA)
183183

184184
**Purpose:** Search the Program Integrity Alliance (PIA) database for document titles only.
185185

186-
**Description:** Returns document titles and metadata without searching the full content. Useful for finding specific documents by title or discovering available documents. Major data sources include: Department of Justice (198k+ docs), Congress.gov (29k+ docs), Oversight.gov (22k+ docs), CRS (22k+ docs), GAO (10k+ docs).
186+
**Description:** Returns document titles and metadata without searching the full content. Useful for finding specific documents by title or discovering available documents. Major data sources include: Department of Justice (198k+ docs), Congress.gov (29k+ docs), Oversight.gov (22k+ docs), CRS (22k+ docs), GAO (10k+ docs), Federal Register (1k+ executive orders). Use pia_search_content_executive_orders to search only executive orders.
187187

188188
**Parameters:**
189189
- `query` (required): Search query text (searches document titles only)
@@ -197,7 +197,7 @@ The server provides 11 tools for searching the Program Integrity Alliance (PIA)
197197

198198
**Purpose:** Get available facets (filter values) for the PIA database title search.
199199

200-
**Description:** This can help understand what filter values are available before performing title searches. Major data sources include: Department of Justice (198k+ docs), Congress.gov (29k+ docs), Oversight.gov (22k+ docs), CRS (22k+ docs), GAO (10k+ docs).
200+
**Description:** This can help understand what filter values are available before performing title searches. Major data sources include: Department of Justice (198k+ docs), Congress.gov (29k+ docs), Oversight.gov (22k+ docs), CRS (22k+ docs), GAO (10k+ docs), Federal Register (1k+ executive orders). Use pia_search_content_executive_orders to search only executive orders.
201201

202202
**Parameters:**
203203
- `query` (optional): Optional query to get facets for (default: "")
@@ -228,7 +228,7 @@ The server provides 11 tools for searching the Program Integrity Alliance (PIA)
228228

229229
**Parameters:**
230230
- `query` (required): Search query text
231-
- `filter` (optional): OData filter expression (SourceDocumentDataSource is automatically set to 'OIG')
231+
- `filter` (optional): OData filter expression (SourceDocumentDataSource is automatically set to 'Oversight.gov')
232232
- `page` (optional): Page number (default: 1)
233233
- `page_size` (optional): Results per page (default: 10)
234234
- `search_mode` (optional): Search mode (default: content)
@@ -280,9 +280,37 @@ The server provides 11 tools for searching the Program Integrity Alliance (PIA)
280280
- `limit` (optional): Maximum results limit
281281
- `include_facets` (optional): Include facets in results (default: false)
282282

283+
### Executive Orders Search Tool
284+
285+
### 10. `pia_search_content_executive_orders`
286+
287+
**Purpose:** Search for Executive Orders document content from the Federal Register.
288+
289+
**Description:** This tool automatically filters results to only include Executive Orders from the Federal Register (https://www.federalregister.gov/). Returns comprehensive results with full citation information and clickable links for proper attribution. Each result includes corresponding citations with data source attribution. Supports complex OData filtering with boolean logic, operators, and grouping.
290+
291+
**Parameters:**
292+
- `query` (required): Search query text
293+
- `filter` (optional): OData filter expression (SourceDocumentDataSource is automatically set to 'Federal Register' and SourceDocumentDataSet is set to 'executive orders')
294+
- `page` (optional): Page number (default: 1)
295+
- `page_size` (optional): Results per page (default: 10)
296+
- `search_mode` (optional): Search mode (default: content)
297+
- `limit` (optional): Maximum results limit
298+
- `include_facets` (optional): Include facets in results (default: false)
299+
300+
**Executive Orders Coverage:**
301+
- **Time Period:** Last 7 presidencies
302+
- **Source:** Federal Register (https://www.federalregister.gov/presidential-documents/executive-orders)
303+
- **Volume:** 1k+ executive orders
304+
- **Update Frequency:** Weekly updates
305+
306+
**Example Searches:**
307+
- Search for cybersecurity executive orders: `{"query": "cybersecurity"}`
308+
- Search for recent executive orders: `{"query": "artificial intelligence", "filter": "SourceDocumentPublishDate ge '2023-01-01'"}`
309+
- Search by specific topics: `{"query": "climate change OR environmental"}`
310+
283311
### ChatGPT Connector Tools
284312

285-
### 10. `search`
313+
### 11. `search`
286314

287315
**Purpose:** Simple search interface for ChatGPT Connectors.
288316

@@ -291,7 +319,7 @@ The server provides 11 tools for searching the Program Integrity Alliance (PIA)
291319
**Parameters:**
292320
- `query` (required): A search query string to find relevant documents in the PIA database
293321

294-
### 11. `fetch`
322+
### 12. `fetch`
295323

296324
**Purpose:** Document retrieval by ID for ChatGPT Connectors.
297325

@@ -309,12 +337,12 @@ Comprehensive search with OData filtering and faceting. The `filter` parameter u
309337

310338
**Example Filter Expressions:**
311339
- Basic filter: `"SourceDocumentDataSource eq 'GAO'"`
312-
- Multiple conditions: `"SourceDocumentDataSource eq 'GAO' or SourceDocumentDataSource eq 'OIG'"`
340+
- Multiple conditions: `"SourceDocumentDataSource eq 'GAO' or SourceDocumentDataSource eq 'Oversight.gov'"`
313341
- Complex grouping: `"SourceDocumentDataSource eq 'GAO' and RecStatus ne 'Closed'"`
314342
- Negation: `"SourceDocumentDataSource ne 'Department of Justice' and not (RecStatus eq 'Closed')"`
315343
- List membership: `"IsIntegrityRelated eq 'Yes' and RecPriorityFlag in ('High', 'Critical')"`
316344
- Date ranges: `"SourceDocumentPublishDate ge '2020-01-01' and SourceDocumentPublishDate le '2024-12-31'"`
317-
- Boolean grouping: `"(SourceDocumentDataSource eq 'GAO' or SourceDocumentDataSource eq 'OIG') and RecStatus eq 'Open'"`
345+
- Boolean grouping: `"(SourceDocumentDataSource eq 'GAO' or SourceDocumentDataSource eq 'Oversight.gov') and RecStatus eq 'Open'"`
318346

319347
**OData Filter Operators:**
320348
- `eq` - equals: `field eq 'value'`
@@ -364,7 +392,7 @@ Use the `pia_search_facets` tool to explore what fields are available for filter
364392
The facets response will show available fields and their possible values:
365393
```json
366394
{
367-
"SourceDocumentDataSource": ["OIG", "GAO", "CMS", "FBI"],
395+
"SourceDocumentDataSource": ["Oversight.gov", "GAO", "CMS", "FBI"],
368396
"RecStatus": ["Open", "Closed", "In Progress"],
369397
"RecPriorityFlag": ["High", "Medium", "Low", "Critical"],
370398
"IsIntegrityRelated": ["Yes", "No"],
@@ -384,7 +412,7 @@ Filter: "SourceDocumentDataSource eq 'GAO' and SourceDocumentPublishDate ge '202
384412
**Complex Example:**
385413
```
386414
Query: "healthcare violations"
387-
Filter: "(SourceDocumentDataSource eq 'OIG' or SourceDocumentDataSource eq 'CMS') and RecPriorityFlag in ('High', 'Critical') and SourceDocumentPublishDate ge '2023-01-01'"
415+
Filter: "(SourceDocumentDataSource eq 'Oversight.gov' or SourceDocumentDataSource eq 'CMS') and RecPriorityFlag in ('High', 'Critical') and SourceDocumentPublishDate ge '2023-01-01'"
388416
```
389417

390418
## 📝 AI Instruction Prompts

src/pia_mcp_server/prompts/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def _generate_titles_search_guidance() -> str:
246246
- Construct the filter in **OData syntax**:
247247
- `SourceDocumentDataSource eq 'GAO'`
248248
- `SourceDocumentTitle contains 'fraud'`
249-
- `(SourceDocumentDataSource eq 'GAO' or SourceDocumentDataSource eq 'OIG') and SourceDocumentIsRecDoc eq 'Yes'`
249+
- `(SourceDocumentDataSource eq 'GAO' or SourceDocumentDataSource eq 'Oversight.gov') and SourceDocumentIsRecDoc eq 'Yes'`
250250
- Use correct operators: `eq`, `ne`, `gt`, `ge`, `lt`, `le`, `and`, `or`, `contains`
251251
- Wrap string values in single quotes `'value'`
252252

src/pia_mcp_server/server.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
handle_pia_search_content_crs,
2424
handle_pia_search_content_doj,
2525
handle_pia_search_content_congress,
26+
handle_pia_search_content_executive_orders,
2627
handle_search,
2728
handle_fetch,
2829
)
@@ -36,6 +37,7 @@
3637
pia_search_content_crs_tool,
3738
pia_search_content_doj_tool,
3839
pia_search_content_congress_tool,
40+
pia_search_content_executive_orders_tool,
3941
search_tool,
4042
fetch_tool,
4143
)
@@ -75,6 +77,7 @@ async def list_tools() -> List[types.Tool]:
7577
pia_search_content_crs_tool,
7678
pia_search_content_doj_tool,
7779
pia_search_content_congress_tool,
80+
pia_search_content_executive_orders_tool,
7881
search_tool,
7982
fetch_tool,
8083
]
@@ -103,6 +106,8 @@ async def call_tool(name: str, arguments: Dict[str, Any]) -> List[types.TextCont
103106
return await handle_pia_search_content_doj(arguments)
104107
elif name == "pia_search_content_congress":
105108
return await handle_pia_search_content_congress(arguments)
109+
elif name == "pia_search_content_executive_orders":
110+
return await handle_pia_search_content_executive_orders(arguments)
106111
elif name == "search":
107112
return await handle_search(arguments)
108113
elif name == "fetch":

src/pia_mcp_server/tools/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
pia_search_content_doj_tool,
2525
handle_pia_search_content_congress,
2626
pia_search_content_congress_tool,
27+
handle_pia_search_content_executive_orders,
28+
pia_search_content_executive_orders_tool,
2729
handle_search,
2830
search_tool,
2931
handle_fetch,
@@ -49,6 +51,8 @@
4951
"pia_search_content_doj_tool",
5052
"handle_pia_search_content_congress",
5153
"pia_search_content_congress_tool",
54+
"handle_pia_search_content_executive_orders",
55+
"pia_search_content_executive_orders_tool",
5256
"handle_search",
5357
"search_tool",
5458
"handle_fetch",

0 commit comments

Comments
 (0)