Company tools
Two tools answer from the profile: get_company_profile returns everything an agent needs to use the other tools correctly, and who_owns says which team a repository or a tracker project belongs to. Neither calls a tracker or a wiki.
get_company_profile
The starting point of every session. The server's instructions tell the agent to call it first, once, before any other tool, and to take filter values (groups, projects, tracker, repository names) from its answer instead of inventing them. It makes no network call: it reads the profile and asks the local code index for its state.
Input
The tool takes no input: its input schema is an empty object, and any parameter is rejected.
Output
| Field | Type | Content |
|---|---|---|
company | string | company from the profile. |
languages | object | tickets and code: the language people write tickets in and the language of identifiers. Skills answer in tickets. |
trackers | array | One entry per tracker: id, type, projects (the declared project keys) and capabilities (what this tracker can do besides returning a ticket: any of comments, attachments, links, history, search, native-query). |
doc_sources | array | id and type of each doc source. fetch_linked_doc only fetches pages one of them recognises. |
repo_groups | object | Group name → repository names. The values for groups filters. |
teams | array | name, projects, repos and, when the profile sets it, confidence (low, medium, high). low means the mapping was guessed by discovery. |
glossary | array | term (a word used in tickets), code (the words used in code) and an optional note. |
conventions | array | The profile's written conventions, as strings. |
index | object | embedder, repos, chunks, oldest_indexed_at (absent when nothing is indexed) and error (see below). |
Example
{}The text content:
Company: acme
Languages: tickets are written in "tr", code in "en"
Trackers (1):
- jira (jira): projects PAY, MOB, WEB; can do: comments, attachments, links, history, search, native-query
Doc sources (1): wiki (confluence)
Repo groups (3):
- backend: payments-api, ledger
- mobile: acme-ios, acme-android
- frontend: web-app, admin-panel
Teams (3):
- Payments: projects PAY · repos payments-api, ledger
- Mobile: projects MOB · repos acme-ios, acme-android · LOW CONFIDENCE (guessed by discovery; confirm with the user)
- Web: projects WEB · repos web-app, admin-panel
Glossary (2) — ticket word → words used in code:
- Sepet → basket, cart
- İade → refund, chargeback
Conventions (2):
- Branch names follow feature/<TICKET-KEY>-short-description.
- Sub-task titles are written in English.
Code index: 3 repos, 13 chunks, embedder ollama:bge-m3, oldest repo indexed 2026-11-20 06:00Z (3 days ago)Nothing in this result is wrapped: text from the profile was written by the operator and is trusted. The structuredContent:
{
"company": "acme",
"languages": {"tickets": "tr", "code": "en"},
"trackers": [
{
"id": "jira",
"type": "jira",
"projects": ["PAY", "MOB", "WEB"],
"capabilities": ["comments", "attachments", "links", "history", "search", "native-query"]
}
],
"doc_sources": [{"id": "wiki", "type": "confluence"}],
"repo_groups": {
"backend": ["payments-api", "ledger"],
"mobile": ["acme-ios", "acme-android"],
"frontend": ["web-app", "admin-panel"]
},
"teams": [
{"name": "Payments", "projects": ["PAY"], "repos": ["payments-api", "ledger"]},
{
"name": "Mobile",
"projects": ["MOB"],
"repos": ["acme-ios", "acme-android"],
"confidence": "low"
},
{"name": "Web", "projects": ["WEB"], "repos": ["web-app", "admin-panel"]}
],
"glossary": [
{"term": "Sepet", "code": ["basket", "cart"]},
{"term": "İade", "code": ["refund", "chargeback"]}
],
"conventions": [
"Branch names follow feature/<TICKET-KEY>-short-description.",
"Sub-task titles are written in English."
],
"index": {
"embedder": "ollama:bge-m3",
"repos": 3,
"chunks": 13,
"oldest_indexed_at": "2026-11-20T06:00:00.000Z"
}
}When the index cannot be read
The profile is useful without the index (a tickets-only setup, an embedder that is not running yet), so a failing index does not fail this tool. index.error then holds one line with the reason, repos and chunks are 0, and the rest of the profile is returned as usual:
…
Code index: NOT AVAILABLE — The code index is locked by another Safran process → You cannot fix this from here. Tell the user, who runs the Safran server: Wait for the other command (a running `safran sync`, for example) to finish, then try again.{
…
"index": {
"embedder": "ollama:bge-m3",
"repos": 0,
"chunks": 0,
"error": "The code index is locked by another Safran process → You cannot fix this from here. Tell the user, who runs the Safran server: Wait for the other command (a running `safran sync`, for example) to finish, then try again."
}
}An index that is readable but empty is reported differently, on the same last line: the line ends with — EMPTY: code tools return nothing until the user runs `safran sync`; ask them to.
Limits
The text rendering is cut at 24,000 characters (profileChars), with a marker that points to list_repos with a group and to who_owns for the parts that did not fit. The structuredContent is not cut.
who_owns
Owning teams of one repository or one tracker project. An agent uses it to say which team a change or a ticket belongs to when the team list of the profile does not settle it; for the whole team list, get_company_profile is the tool.
Input
| Parameter | Type | Required | Notes |
|---|---|---|---|
repo | string | one of the two | Repository short name as list_repos shows it, for example payments-api. 1 to 200 characters. |
project | string | one of the two | Tracker project key, the part of a ticket key before the number, for example PAY. 1 to 100 characters. |
Exactly one of repo and project must be given.
Output
| Field | Type | Content |
|---|---|---|
teams | array | The owning teams, each with name, projects, repos and optional confidence. Empty when no owner is known. |
basis | string | profile: declared in the profile. history: inferred from merged pull requests (repositories only). none: unknown. |
Example
{"repo": "payments-api"}Owner of repo payments-api (declared in the company profile):
- Payments: projects PAY · repos payments-api, ledger{
"teams": [{"name": "Payments", "projects": ["PAY"], "repos": ["payments-api", "ledger"]}],
"basis": "profile"
}A low-confidence mapping is flagged in the text, so the agent confirms it with the user before building on it:
{"project": "MOB"}Owner of project MOB (declared in the company profile):
- Mobile: projects MOB · repos acme-ios, acme-android · LOW CONFIDENCE (guessed by discovery; confirm with the user)When basis is history, the text says INFERRED from merged pull requests, not declared — present it as a likely owner, not a fact. That inference reads the local link store which safran links refresh fills; see find_past_work.
Unknown is not an error
A repository or project nobody owns, and one that does not exist, both answer teams: [] with basis: none. The text tells the agent how to tell the two apart:
{"repo": "billing-core"}No team is known for repo billing-core.
→ Check the name with list_repos. If it is right, the profile declares no owner and merged pull requests point to none: say the owner is unknown.{"teams": [], "basis": "none"}Errors
Passing both parameters, or neither, is rejected before the tool runs:
Input validation error: Invalid arguments for tool who_owns: Pass exactly one of `repo` or `project`