Skip to main content
Glama

update_journal

Edit comments on Redmine issues by updating journal entries with new content. Modify existing issue notes to reflect changes or corrections.

Instructions

Edits a journal (comment) on an issue. Requires Redmine 5.0+.

Args:
    journal_id: Comment ID (journals[].id from get_issue response)
    notes: New comment content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
journal_idYes
notesYes

Implementation Reference

  • The core implementation of the update_journal logic using the requests library.
    def update_journal(self, journal_id: int, notes: str) -> Dict[str, Any]:
        """Edit a journal (comment). Requires Redmine 5.0+."""
        try:
            url = f"{self._url}/journals/{journal_id}.json"
            resp = requests.put(
                url,
                json={"journal": {"notes": notes}},
                headers={"X-Redmine-API-Key": self._api_key},
                timeout=30,
            )
            if resp.status_code == 200:
                return resp.json().get("journal", {"id": journal_id, "notes": notes})
            elif resp.status_code == 204:
                return {"id": journal_id, "notes": notes}
            else:
                raise RedmineError(
                    f"update_journal failed: HTTP {resp.status_code} {resp.text}"
                )
        except RedmineError:
            raise
        except Exception as e:
            raise RedmineError(f"update_journal failed: {e}") from e
  • Tool registration and wrapper function for update_journal.
    @mcp.tool()
    def update_journal(journal_id: int, notes: str) -> Dict[str, Any]:
        """Edits a journal (comment) on an issue. Requires Redmine 5.0+.
    
        Args:
            journal_id: Comment ID (journals[].id from get_issue response)
            notes: New comment content
        """
        logger.info(f"tool=update_journal journal_id={journal_id}")
        try:
            return _client().update_journal(journal_id=journal_id, notes=notes)
        except RedmineError as e:
            logger.error(f"update_journal error: {e}")
            raise

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/daiji-sshr/redmine-mcp-stateless'

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