Skip to main content

Document Tools

2 requirements · 8 scenarios

Paragraph-Level Read Tracking for read_file

JR-document-tools-001
The read_file tool SHALL track and report which paragraph IDs were read when using filtered reading modes (offset/limit or node_ids).

The tool SHALL:
- Collect jr_para_* IDs from all paragraphs included in the response
- Include a "Read paragraphs" summary in the LLM-facing message for filtered reads
- Cap the ID list at 10 entries, appending "... and N more" when exceeded
- NOT include paragraph ID lists for full document reads (too verbose)

The user-facing summary SHALL:
- For filtered reads: indicate paragraph count (e.g., "read 5 paragraphs from Document.docx")
- For full reads: maintain existing format with word count
4 test scenarios
  • Filtered read with offset/limit includes paragraph IDs JR-document-tools-001.1
  • Filtered read with node_ids includes paragraph IDs JR-document-tools-001.2
  • Full document read omits paragraph ID list JR-document-tools-001.3
  • Large filtered read caps paragraph ID list JR-document-tools-001.4

Paragraph Summary for grep Results

JR-document-tools-002
The grep tool SHALL include a summary of unique paragraph IDs containing matches in its response.

The tool SHALL:
- Deduplicate paragraph IDs (same paragraph may have multiple matches)
- Append a "Matching paragraphs" footer to the LLM-facing message
- Cap the ID list at 10 entries, appending "... and N more" when exceeded
- Include unique paragraph count in the user-facing summary
4 test scenarios
  • grep returns matching paragraph IDs JR-document-tools-002.1
  • Multiple matches in same paragraph are deduplicated JR-document-tools-002.2
  • Many matching paragraphs caps ID list JR-document-tools-002.3
  • No matches returns no paragraph list JR-document-tools-002.4