Skip to Content
Source NodesWriting Source Nodes

Writing Source Nodes

The markdown body of a source node is an instruction set for agents. Write it as a clear, step-by-step runbook.

Structure

A good source node body includes:

  1. Context — What this source provides and when to use it
  2. Fetch instructions — Which tools to call, with what parameters
  3. Interpretation guidance — How to read and present the results
  4. Error handling — What to do if calls fail

Example: Jira sprint source

# Current Sprint Tickets This source provides live sprint data from Jira. Before fetching, check the project-config source for the active project key. ## Fetch the sprint Call `jira_get_sprint_issues` with: - **project**: Use the project key from project-config - **sprint**: "current" - **fields**: summary, status, assignee, priority, labels ## Interpret the results - Group tickets by status: To Do → In Progress → Done - Flag any ticket with status "Blocked" or with no assignee - Highlight tickets with the "urgent" label - Count total story points and completed story points ## If the call fails If Jira is unreachable, note the failure and continue without sprint data. Do not retry more than once.

Writing tips

  • Be specific about parameters — Don’t say “fetch the data.” Say “call tool_name with param: value.”
  • Include conditional logic — “If the user is asking about a specific ticket, fetch that ticket. Otherwise, fetch the full sprint.”
  • Reference upstream sources — “Read the project key from the project-config source” tells the agent about the dependency chain.
  • Keep it readable — The body is markdown. Use headings, lists, and code blocks for clarity.
Last updated on