Skip to main content
Glama
add tools.md2.93 kB
great so we need to also have the ability to more effectively edit the documents using the extension, currently I don't think we have search and replace, it'd be great to also have per paragraph reading and editing capabilities, so for example we could see we have 25 paragraphs, we could see the headings or subheadings for those paragraphs but we wouldn't need to read the entire file and slam our context window with a bunch of data. how can we have more surgical edits, where for example you could place the cursor exactly where you wanted it and then type in the new text or delete the old text, not even a search and replace but fully leveraging the streaming nature of the extension to essentially replicate human style editing, look at big picture, then zoom into particular sections reading what's around it, developing a mental model and outline, then adding relevant citations and facts that tell an overarching story. I think we can improve this libreoffice plugin to have more capabilities that would enable that type of work. what do you suggest? ● Great question! Here's what I suggest for surgical, efficient document editing: Proposed New Tools 1. Document Structure (see the big picture) - get_document_outline - Get headings/structure with paragraph numbers - get_paragraph_count - Total paragraphs - get_paragraph(n) - Read just paragraph N - get_paragraphs_range(start, end) - Read paragraphs N to M 2. Navigation (position the cursor) - goto_paragraph(n) - Move cursor to paragraph N - goto_position(char_pos) - Move cursor to character position - get_cursor_position - Where is cursor now? - get_context_around_cursor(chars) - See N chars before/after cursor 3. Surgical Edits (precise changes) - select_paragraph(n) - Select paragraph N - select_text_range(start, end) - Select character range - delete_selection - Delete selected text - replace_selection(text) - Replace selection with new text 4. Search & Replace - find_text(query) - Find text, return positions - find_and_replace(old, new) - Replace first occurrence - find_and_replace_all(old, new) - Replace all occurrences Workflow Example 1. get_document_outline() → "25 paragraphs, headings at 1,5,12,18" 2. get_paragraph(5) → Read just the intro paragraph 3. goto_paragraph(12) → Move to "Methods" section 4. get_context_around_cursor(200) → See surrounding text 5. find_text("citation needed") → Find where citations are missing 6. goto_position(1523) → Go to that spot 7. insert_text("[Smith 2024]") → Add the citation Want me to implement these? I'd suggest starting with: 1. get_document_outline + get_paragraph_count 2. get_paragraph + get_paragraphs_range 3. goto_paragraph + get_cursor_position 4. find_and_replace + find_and_replace_all

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jwingnut/mcp-libre'

If you have feedback or need assistance with the MCP directory API, please join our Discord server