Skip to content

Commit 1ace983

Browse files
committed
Remove unused fields from list accounts mcp tool
1 parent d0866b1 commit 1ace983

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/mcp-common/src/tools/account.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ export function registerAccountTools(agent: CloudflareMcpAgent) {
2020
if (!b.created_on) return -1
2121
return new Date(b.created_on).getTime() - new Date(a.created_on).getTime()
2222
})
23+
// Remove fields not needed by the LLM
24+
.map((account) => {
25+
return {
26+
id: account.id,
27+
name: account.name,
28+
created_on: account.created_on,
29+
}
30+
})
2331

2432
return {
2533
content: [

0 commit comments

Comments
 (0)