get_attributions
Retrieve data source attributions and licences for all property data used by this server.
Instructions
Show data source attributions and licences for all data used by this server. Only call this tool when the user explicitly asks about data sources, credits, or attributions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/attribution.ts:17-26 (handler)The handler function for the 'get_attributions' tool. Returns a static list of data source attributions (OpenStreetMap, URA, data.gov.sg) as a text response.
async (_params, extra: ToolExtra) => { await logInfo(extra, "get_attributions: returning attribution list"); return { content: [{ type: "text" as const, text: `**Data Source Attributions**\n\nThis server uses the following data sources:\n\n${ATTRIBUTIONS.join("\n\n")}`, }], }; }, - src/tools/attribution.ts:14-16 (schema)The tool registration with name 'get_attributions', description, and an empty params schema (no input parameters required).
"get_attributions", "Show data source attributions and licences for all data used by this server. Only call this tool when the user explicitly asks about data sources, credits, or attributions.", {}, - src/tools/attribution.ts:12-28 (registration)Registration function that registers the 'get_attributions' tool on the MCP server via server.tool().
export function registerAttributionTools(server: McpServer): void { server.tool( "get_attributions", "Show data source attributions and licences for all data used by this server. Only call this tool when the user explicitly asks about data sources, credits, or attributions.", {}, async (_params, extra: ToolExtra) => { await logInfo(extra, "get_attributions: returning attribution list"); return { content: [{ type: "text" as const, text: `**Data Source Attributions**\n\nThis server uses the following data sources:\n\n${ATTRIBUTIONS.join("\n\n")}`, }], }; }, ); } - src/index.ts:22-22 (registration)Main entry point: calls registerAttributionTools (which registers 'get_attributions') during server initialization.
registerAttributionTools(server); - src/helpers.ts:34-39 (helper)Helper function logInfo used by the handler to send an info-level log notification to the client.
export async function logInfo(extra: ToolExtra, data: string): Promise<void> { await extra.sendNotification({ method: "notifications/message" as const, params: { level: "info", logger: SERVER_NAME, data }, }); }