Company and server tools
Three tools answer from local state. get_company_profile returns everything an agent needs to use the other tools correctly, who_owns says which team a repository or a tracker project belongs to, and get_server_info reports on the server itself: its tools, whether it may write, and how fresh its data is. None of them calls a tracker, a code host 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, created-since, children, worklogs, time-tracking, iterations, write:comment, write:create-child, assignee-filter). |
code_hosts | array | One entry per code host: id, type and capabilities. pull-requests-live, pr-threads and pr-diff say which pull request tools work on that host; write:pr-comment and write:pr-reply say what it could write if the profile allowed it. |
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. |
title_prefixes | object | Side → the prefixes this company writes in front of ticket titles (tickets.title_prefixes in the profile). get_linked_work finds counterpart tickets with them. Empty when the profile defines none. |
writes | object | enabled and allowed (the kinds of write this server may perform). get_server_info adds the reason when they are off. |
tool_packs | array | The tool packs the profile loads: id, type and tools (names). |
index | object | embedder, repos, chunks, oldest_indexed_at (absent when nothing is indexed) and error (see below). |
hints | array of strings, optional | The → lines of the text result, word for word, when it has any: why a list is empty and what to try next, where the rest of something is. Safran's own sentences, never third-party text. Absent when there is nothing to add. |
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, created-since, children, worklogs, time-tracking, iterations, write:comment, write:create-child, assignee-filter
Code hosts (1):
- azure (azure-repos): can do: pull-requests, remote-head, pull-requests-live, pr-diff, pr-threads, write:pr-comment, write:pr-reply
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.
Ticket title prefixes (side → prefixes; get_linked_work uses them to find counterpart tickets): backend: [BE]; mobile: [iOS] [Android]
Writes: off — Safran is read-only here; give the user text to post themselves
Code index: 3 repos, 13 chunks, embedder ollama:bge-m3, oldest repo indexed 2026-11-20 06:00Z (3 days ago)The text is one labelled block per part (Company:, Trackers (n):, Code hosts (n):, …) with one - line per entry, and it ends with a Writes: line and a Code index: line. Nothing in this result is wrapped: text from the profile was written by the operator and is trusted.
The test doubles behind this example declare every capability there is, the write: ones included. A write: capability says the connector can do it with its API; whether Safran may is decided by the profile, which is why the Writes: line reads off here. A real connector lists what it supports; see the connectors overview. 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",
"created-since",
"children",
"worklogs",
"time-tracking",
"iterations",
"write:comment",
"write:create-child",
"assignee-filter"
]
}
],
"code_hosts": [
{
"id": "azure",
"type": "azure-repos",
"capabilities": [
"pull-requests",
"remote-head",
"pull-requests-live",
"pr-diff",
"pr-threads",
"write:pr-comment",
"write:pr-reply"
]
}
],
"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."
],
"title_prefixes": {"backend": ["[BE]"], "mobile": ["[iOS]", "[Android]"]},
"writes": {"enabled": false, "allowed": []},
"tool_packs": [],
"index": {
"embedder": "ollama:bge-m3",
"repos": 3,
"chunks": 13,
"oldest_indexed_at": "2026-11-20T06:00:00.000Z"
}
}With writes enabled
When the profile enables writes, the last lines say for which kinds and how:
…
Writes: ENABLED for ticket.comment, ticket.create_child, pull_request.comment, pull_request.reply — only through preview_write, then commit_write after the user's explicit yes
Code index: 3 repos, 13 chunks, embedder ollama:bge-m3, oldest repo indexed 2026-11-20 06:00Z (3 days ago){
…
"writes": {
"enabled": true,
"allowed": ["ticket.comment", "ticket.create_child", "pull_request.comment", "pull_request.reply"]
},
…
}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": "fake",
"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. |
hints | array of strings, optional | The → lines of the text result, word for word, when it has any: why a list is empty and what to try next, where the rest of something is. Safran's own sentences, never third-party text. Absent when there is nothing to add. |
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`
→ Fix the arguments and call the tool again; its input schema says what each one takes.
[code: INVALID_INPUT]get_server_info
Health and configuration of the running server, from local state only: no tracker and no code host is called. An agent calls it when a tool it expects is missing, when many calls fail at once (an expired token), before proposing a write, or when results look outdated. For the company's trackers, groups and glossary the tool is get_company_profile.
Input
The tool takes no input.
Output
| Field | Type | Content |
|---|---|---|
server | object | name, version, started_at (when this process first served the loaded profile) and, when the client announced one, client. |
tools | array of strings | The names registered on this connection, tool-pack tools included. |
profile | object | company and counts: trackers, code_hosts, doc_sources, repo_groups, teams, glossary; file (the profile's file name) and modified_at when the profile came from a file; changed_since_start. |
writes | object | enabled, allowed (the kinds), require_confirmation, and reason when writes are off: one sentence naming the switch. |
tool_packs | array | Each id, type and tools (names). |
tokens | array | One entry per connector entry that declares token_expires: source, kind (tracker, code-host or doc-source), expires_on, days_left, status. Expired first, then the soonest. |
index | object | embedder, repos, chunks, optional oldest_indexed_at, stale_repos, and error when the index cannot be read. |
links | object | The link store behind find_past_work: records, optional refreshed_at, incomplete_repos, and error when it cannot be read. |
warnings | array of strings | What needs the user's attention: expired and expiring tokens, a stale or empty index, an empty or incomplete link store, a profile file changed after the start. Plain sentences, always present, empty when there is nothing. |
hints | array of strings, optional | The → lines of the text result, word for word, when it has any: why a list is empty and what to try next, where the rest of something is. Safran's own sentences, never third-party text. Absent when there is nothing to add. |
A token's status is ok, expiring (14 days or fewer left) or expired. Safran never reads a token to learn its expiry: the date is what the operator wrote as token_expires in the profile, and an entry without it is not listed.
Example
{}Safran MCP server safran 0.2.0 · serving since 2026-11-23 12:00Z (just now) · client claude-code
Profile: acme — 1 tracker, 1 code host, 1 doc source, 3 repo groups, 3 teams, 2 glossary terms
Profile file: none (the profile was passed in code)
A change to the profile (enabling writes included) takes effect only after the server is restarted.
Writes: OFF. The profile has `writes.enabled: false` (the default). preview_write and commit_write are not registered; give the user the text to post themselves.
Tools on this connection (23): get_company_profile, who_owns, get_server_info, get_ticket, get_ticket_comments, get_ticket_attachment, get_ticket_history, get_ticket_family, get_linked_work, get_ticket_changes, get_ticket_time, search_tickets, fetch_linked_doc, search_code, grep_code, read_file, list_repos, find_past_work, find_pull_request, list_pull_requests, get_pull_request, get_pull_request_threads, get_pull_request_diff
If a tool you expect is not in this list, your client holds an old tool list: tell the user to reconnect.
Tool packs: none
Tokens (2):
- jira (tracker): expires 2026-11-30, 7 days left — EXPIRING SOON
- azure (code-host): expires 2027-03-01, 98 days left
Code index: 3 repos, 13 chunks, embedder ollama:bge-m3, oldest repo indexed 2026-11-20 06:00Z (3 days ago)
Link store: 2 merged pull requests, refreshed 2026-11-23 11:48Z (12 minutes ago)
Warnings (1) — tell the user:
- The token of tracker "jira" expires in 7 days (2026-11-30). Create a new one and update `token_expires` in the profile.The structuredContent (the tool names left out):
{
"server": {
"name": "safran",
"version": "0.2.0",
"started_at": "2026-11-23T12:00:00.000Z",
"client": "claude-code"
},
"tools": ["get_company_profile", "who_owns", …],
"profile": {
"company": "acme",
"trackers": 1,
"code_hosts": 1,
"doc_sources": 1,
"repo_groups": 3,
"teams": 3,
"glossary": 2,
"changed_since_start": false
},
"writes": {
"enabled": false,
"allowed": [],
"require_confirmation": true,
"reason": "The profile has `writes.enabled: false` (the default)."
},
"tool_packs": [],
"tokens": [
{
"source": "jira",
"kind": "tracker",
"expires_on": "2026-11-30",
"days_left": 7,
"status": "expiring"
},
{
"source": "azure",
"kind": "code-host",
"expires_on": "2027-03-01",
"days_left": 98,
"status": "ok"
}
],
"index": {
"embedder": "ollama:bge-m3",
"repos": 3,
"chunks": 13,
"oldest_indexed_at": "2026-11-20T06:00:00.000Z",
"stale_repos": []
},
"links": {"records": 2, "refreshed_at": "2026-11-23T11:48:23.273Z", "incomplete_repos": []},
"warnings": [
"The token of tracker \"jira\" expires in 7 days (2026-11-30). Create a new one and update `token_expires` in the profile."
]
}What the answer is for
- A missing tool.
toolsis what this connection really has. If a tool a skill expects is not in it, the client holds an old tool list, and the agent tells the user to reconnect. - A changed profile.
profile.changed_since_start: truemeans the profile file was modified after the server started. The server still runs the old profile (writes, tool packs, trackers as they were), and the user has to restart it. It isfalsefor an unchanged file and for a profile passed in code, in which casefileis absent, as in the example. - Writes. With writes on, the line reads
Writes: ENABLED — allowed kinds: …,reasonis absent andtoolsends withpreview_writeandcommit_write. With writes off,reasonnames the switch that keeps them off, so the agent can tell the user what to change instead of guessing. See write tools. - Warnings are for the user. The agent passes them on; it does not act on them.
On a server without declared expiry dates the token block is one line: Tokens: no connector declares an expiry date (`token_expires`), so none can be checked.