Skip to content

Commit 4b7e411

Browse files
authored
Merge pull request #7 from Talljoe/support-empty-args
fix: allow tool calls with no arguments
2 parents 1fbf5cf + 514f151 commit 4b7e411

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/mcp-server.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,7 @@ export async function runMCPServer(config: MCPServerConfig) {
6767
// Handle call tool request
6868
server.setRequestHandler(CallToolRequestSchema, async (request) => {
6969
try {
70-
const { name, arguments: args } = request.params;
71-
72-
if (!args) {
73-
throw new Error('No arguments provided');
74-
}
70+
const { name, arguments: args = null } = request.params;
7571

7672
// Call the handler
7773
const result = await config.handleRequest({ name, args });

0 commit comments

Comments
 (0)