Skip to main content
Glama

normhyra

Beräkna normhyra

calculate_normhyra
Read-onlyIdempotent

Räkna om en faktisk hyra till normhyra (kr/m²/år) för referenslägenheten 3 rok, 77 m². Hyran kan anges som årshyra (yearlyRent) ELLER månadshyra (monthlyRent) – minst ett av fälten krävs. Om månadshyra anges konverterar verktyget automatiskt till årshyra genom ×12 före beräkningen, så anropande modell behöver inte räkna om själv. Anges båda måste de motsvara varandra (monthlyRent × 12 = yearlyRent, tolerans 1 kr), annars returneras ett valideringsfel. Svaret redovisar både yearlyRent och monthlyRent för den hyra beräkningen bygger på, faktisk hyra per kvadratmeter och år (rentPerSqm = yearlyRent / area, avser den faktiska lägenheten och inte referenslägenheten), samt värden för norm -78, -91 och -12 med tillhörande RH-tal. Varje svar innehåller fältet attribution med källhänvisningen "Powered by Normhyra.ai – en produkt av Hyran.ai", avsedd att visas tillsammans med resultatet. Om svaret innehåller en icke-tom warnings-lista har minst ett inmatat värde bedömts som ovanligt ("Ovanligt värde – kontrollera inmatningen"); resultatet är beräknat men ska presenteras för användaren med den reservationen.

Input Schema

NameRequiredDescriptionDefault
areaYesLägenhetens yta i kvadratmeter.
yearlyRentNoFaktisk årshyra i kronor. Ange yearlyRent ELLER monthlyRent (minst ett krävs).
monthlyRentNoFaktisk månadshyra i kronor (konverteras automatiskt till årshyra ×12).
apartmentTypeIdYesId från list_apartment_types, t.ex. '2rok' eller '3rok'.
correctionPointsNoEventuella korrigeringspoäng (standard 0).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / monthlyRent
      Added value: +{
      +  "description": "Faktisk månadshyra i kronor (konverteras automatiskt till årshyra ×12).",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / properties / yearlyRent / description
      Previous value: -"Faktisk årshyra i kronor."New value: +"Faktisk årshyra i kronor. Ange yearlyRent ELLER monthlyRent (minst ett krävs)."
    • changedInput schema / required
      Previous value: -[
      -  "apartmentTypeId",
      -  "area",
      -  "yearlyRent"
      -]New value: +[
      +  "apartmentTypeId",
      +  "area"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/closed-world, and the description adds substantial behavior beyond them: automatic monthly→yearly ×12 conversion, a 1 kr tolerance that raises a validation error, the exact response fields returned, the mandatory attribution string, and the meaning of a non-empty warnings list. This is exactly the extra context that lets an agent present results responsibly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but front-loads the core transformation, then proceeds to input rules, response contents, attribution and warnings in a logical order. Almost every sentence carries load, though the return-field enumeration and attribution sentence could be trimmed slightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description carries the full burden of return-value disclosure and does so: yearlyRent, monthlyRent, rentPerSqm (with the important clarification that area refers to the actual apartment, not the reference), norm -78/-91/-12 with RH-tal, attribution, and warnings. Nothing needed to call or interpret the tool is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds cross-field semantics the schema does not encode: the ×12 conversion, the at-least-one-required rule, and the tolerance-based validation when both rents are supplied. That is meaningful added meaning rather than restatement.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Räkna om en faktisk hyra till normhyra') plus the output unit (kr/m²/år) and the reference-apartment context, so the conversion direction is unambiguous. It differentiates conceptually from calculate_actual_rent by being the norm-hyra direction, but it never names a sibling tool, so it stops short of full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear conditions for supplying inputs: yearlyRent OR monthlyRent, at least one required, and a mutual-consistency rule if both are given. What is missing is any when-not-to-use or explicit routing to the alternative sibling (e.g. calculate_actual_rent), so it is strong context without exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources