Skip to content

Commit bcf510f

Browse files
committed
feat: remove rate limits tool
- Delete rate_limits.py tool file - Remove rate limits imports and handlers from server.py - Update tools __init__.py to remove rate limits exports - Update README to reflect 2 tools instead of 3 - Update smithery.yaml configuration - Update tests to reflect new tool count - Simplify to essential search and faceting functionality only BREAKING CHANGE: get_rate_limit_stats tool is no longer available
1 parent 0447380 commit bcf510f

File tree

6 files changed

+2
-102
lines changed

6 files changed

+2
-102
lines changed

README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ This data is updated weekly, and we will be adding more datasets and tools soon.
2626

2727
- 🔎 **Document Search**: Query PIA database with comprehensive OData filtering options
2828
- 📊 **Faceted Search**: Discover available filter fields and values
29-
- 📈 **Rate Limiting**: Monitor API usage and current limits
3029
- 📝 **Research Prompts**: Specialized prompts for fraud investigation, compliance, and risk analysis
3130

3231
## 🚀 Quick Start
@@ -102,7 +101,7 @@ For Development:
102101

103102
## 💡 Available Tools
104103

105-
The server provides three main tools:
104+
The server provides two main tools:
106105

107106
### 1. PIA Search
108107
Comprehensive search with OData filtering and faceting. The `filters` parameter uses standard [OData query syntax](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html).
@@ -162,15 +161,6 @@ Discover available field names and values for filtering.
162161

163162
This information helps you construct proper `filters` for the `pia_search` tool.
164163

165-
### 3. Rate Limit Stats
166-
Monitor API usage and current configuration.
167-
168-
**Tool Name:** `get_rate_limit_stats`
169-
170-
**Parameters:** None
171-
172-
**Returns:** JSON structure with rate limiting statistics including request counts, blocked requests, and current limits configuration.
173-
174164
## 🔍 Filter Discovery Workflow
175165

176166
To effectively use OData filters, follow this workflow:

smithery.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ mcp:
99
tools:
1010
- pia_search
1111
- pia_search_facets
12-
- get_rate_limit_stats
1312
prompts:
1413
- fraud_investigation_search
1514
- compliance_recommendations

src/pia_mcp_server/server.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
from .tools import (
1717
handle_pia_search,
1818
handle_pia_search_facets,
19-
handle_get_rate_limit_stats,
2019
)
2120
from .tools import (
2221
pia_search_tool,
2322
pia_search_facets_tool,
24-
get_rate_limit_stats_tool,
2523
)
2624
from .prompts.handlers import list_prompts as handler_list_prompts
2725
from .prompts.handlers import get_prompt as handler_get_prompt
@@ -52,7 +50,6 @@ async def list_tools() -> List[types.Tool]:
5250
return [
5351
pia_search_tool,
5452
pia_search_facets_tool,
55-
get_rate_limit_stats_tool,
5653
]
5754

5855

@@ -65,8 +62,6 @@ async def call_tool(name: str, arguments: Dict[str, Any]) -> List[types.TextCont
6562
return await handle_pia_search(arguments)
6663
elif name == "pia_search_facets":
6764
return await handle_pia_search_facets(arguments)
68-
elif name == "get_rate_limit_stats":
69-
return await handle_get_rate_limit_stats(arguments)
7065
else:
7166
return [types.TextContent(type="text", text=f"Error: Unknown tool {name}")]
7267
except Exception as e:

src/pia_mcp_server/tools/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77

88
from .pia_search import handle_pia_search, pia_search_tool
99
from .pia_search_facets import handle_pia_search_facets, pia_search_facets_tool
10-
from .rate_limits import handle_get_rate_limit_stats, get_rate_limit_stats_tool
1110

1211
__all__ = [
1312
"handle_pia_search",
1413
"pia_search_tool",
1514
"handle_pia_search_facets",
1615
"pia_search_facets_tool",
17-
"handle_get_rate_limit_stats",
18-
"get_rate_limit_stats_tool",
1916
]

src/pia_mcp_server/tools/rate_limits.py

Lines changed: 0 additions & 80 deletions
This file was deleted.

tests/test_server.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ async def test_list_tools():
1111
"""Test that tools are properly listed."""
1212
tools = await list_tools()
1313

14-
assert len(tools) == 3
14+
assert len(tools) == 2
1515
tool_names = [tool.name for tool in tools]
1616

1717
expected_tools = [
1818
"pia_search",
1919
"pia_search_facets",
20-
"get_rate_limit_stats",
2120
]
2221

2322
for expected_tool in expected_tools:

0 commit comments

Comments
 (0)