{"version":"1.0","protocolVersion":"2026-07-28","serverInfo":{"name":"nota4you","title":"Nota4You","version":"1.0.0","description":"Emissor de NFS-e Nacional (Sefin Nacional) com IBS e CBS da Reforma Tributária, para empresas brasileiras. Emite pelo app web, por assistentes de IA (servidor MCP com OAuth) e por API REST.","websiteUrl":"https://staging.nota4you.com.br/"},"documentationUrl":"https://staging.nota4you.com.br/docs/assistentes-de-ia","transport":{"type":"streamable-http","endpoint":"https://app-staging.nota4you.com.br/mcp"},"authentication":{"required":true,"schemes":["oauth2","bearer"],"protectedResourceMetadata":"https://app-staging.nota4you.com.br/.well-known/oauth-protected-resource/mcp"},"capabilities":{"tools":{},"resources":{},"prompts":{}},"instructions":"Issues and reads Brazilian NFS-e (Nota Fiscal de Serviço eletrônica, Sefin Nacional) for the user's taxpayers.\nNew user, or no taxpayer yet: call get_setup_status and follow its next_step (prompt first_invoice).\nNever ask for the certificate file or its password in the chat; use request_certificate_upload.\nAlways preview_invoice, show the preview and get the user's confirmation before emit_invoice.\nEmission is asynchronous: follow it with get_invoice. CPF numbers in results are masked on purpose.\nTalk to the user in Brazilian Portuguese unless they write in another language.\n","tools":[{"name":"get_setup_status","description":"Where the user stands on the way to the first NFS-e: each active taxpayer's certificate state, service and customer counts, authorized invoices and next_step (create_taxpayer, create_service, create_customer, upload_certificate, emit_invoice, done). Call it first with a new user, and again after the user uploads the certificate.","annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true}},{"name":"lookup_company","description":"Read a company from the CNPJ registry (Receita Federal open data, monthly snapshot) before create_taxpayer. Returns the registry data, missing_fields that create_taxpayer still needs, missing_for_emission (tax rates to ask before the first invoice) and taxpayer_id when the account already has this CNPJ. Show the data to the user and ask them to confirm it, the Simples Nacional status in particular.","annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true}},{"name":"create_taxpayer","description":"Register a company (CNPJ) as a taxpayer (prestador). The registry data fills the rest; the given fields win over it. Call lookup_company first, show the data and get the user's confirmation. When the registry is unavailable, give legal_name, email, simples_status and the full address.","annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false}},{"name":"search_service_codes","description":"Find national service codes (cTribNac, LC 116 list) by words in Portuguese or by code, for create_service. Each code lists its allowed combinations of NBS, operation indicator (cIndOp) and tax classification (cClassTrib). Propose the best fit to the user in plain words and let them confirm.","annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true}},{"name":"create_service","description":"Add a service to a taxpayer's catalog. Take national_service_code and one combination of nbs_code, operation_indicator and tax_classification_code from search_service_codes; when the code has a single combination they can be left out. Confirm name, description and codes with the user first.","annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false}},{"name":"request_certificate_upload","description":"Create a one-time browser link where the user uploads the taxpayer's A1 digital certificate (.pfx) and its password. Give the link to the user. Never ask for the certificate file or its password in the chat. The link works once, for 1 hour. Then call get_setup_status to see the certificate.","annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false}},{"name":"list_taxpayers","description":"List the active taxpayers (prestadores) this credential can issue invoices for.","annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true}},{"name":"search_customers","description":"Find a taxpayer's customers (tomadores) by name or document (CNPJ, CPF, NIF). Returns at most 20, CPF masked.","annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true}},{"name":"create_customer","description":"Register a customer (tomador) for a taxpayer. Brazilian customers (CNPJ, CPF) take a Brazilian address; foreign customers (NIF, or none with a reason) take an address abroad.","annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false}},{"name":"list_services","description":"List a taxpayer's active service catalog: name, description template, national service code (cTribNac), NBS, ISS.","annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true}},{"name":"preview_invoice","description":"Validate an invoice and estimate its taxes and net value. Saves nothing. Show the preview to the user and get a confirmation before emit_invoice. emit_invoice needs the returned preview_id and the same fields. warnings certificate_missing or certificate_expired: the preview is fine, but emission needs a certificate first (request_certificate_upload). warning federal_retention_below_minimum: an IRRF or a PIS+COFINS+CSLL withholding of R$ 10 or less; the customer may skip it when its monthly total stays under R$ 10. Ask the user whether to keep it or send the rate as \"0\".","annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true}},{"name":"emit_invoice","description":"Emit an invoice (NFS-e) to Sefin Nacional. Call only after the user confirmed the preview_invoice result. Send the same fields as the preview, its preview_id, and a new idempotency_key per invoice; a retry with the same key returns the same invoice. Emission is asynchronous: follow the status with get_invoice until it is authorized or rejected.","annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false}},{"name":"get_invoice","description":"Read an invoice: status (queued, transmitting, authorized, rejected, cancelled, substituted), rejection messages, taxes, access key, NFS-e number, public_url, cancelled_at, the cancellation and substitution events, and danfse_uri (an MCP resource with the DANFSe PDF) once authorized.","annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true}},{"name":"list_invoices","description":"List a taxpayer's invoices, newest first, 20 per page. Filter by status, customer and competence date range.","annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true}},{"name":"cancel_invoice","description":"Cancel an authorized invoice (NFS-e) at Sefin Nacional with event 101101. Irreversible. Call only after the user confirmed: show the NFS-e number, customer, value and the reason first. Cancellation is asynchronous: follow it with get_invoice until the status is cancelled, or the event is rejected (its messages say why, for example a deadline that passed).","annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false}}],"prompts":[{"name":"first_invoice","description":"Take a new user from nothing to the first NFS-e: company, certificate, service, customer, preview, emission."},{"name":"emit_invoice","description":"Guide the user through one NFS-e: taxpayer, customer, service, value, preview, confirmation, emission."},{"name":"monthly_billing","description":"Emit one NFS-e per line of a billing list the user pastes (customer, value, optional description)."}]}