MCP server with multiple open writer documents, but only edit one? #312
Replies: 5 comments
|
That's a great question. I should clarify in the README. The active document is by default. Right now, you can pass in a header: "headers": { There could be other ways of doing it, can you use that? |
For me yes, but not for my users :) |
|
Dang, well I could add a file parameter to every core tool call, but I was trying to avoid that and have the code and API be the same between the regular and MCP case. I could probably build a wrapper that adds an extra parameter without too much work actually, but it becomes Python magic which makes the code even more complicated. I believe another LO extension, Nelson-MCP uses the HTTP headers and it seems to work for their users. I'll do some thinking and research on this. It's an interesting challenge. |
|
Okay, I found a way to do it without changing much code: 8d36151 I created a list_open_documents tool clal, and I changed it so that for MCP only, each function has an optional parameter of a filename. It's treated like the HTTP header. Try out the new build 0.8.15 when you have time and let me know how it goes. |
|
That works great! |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
maybe a stupid question, but how to work with MCP if multiple writer documents are open and I only like to edit one of them?
Sam
All reactions